Create a dynamic url link in Confluence with username embeded

We use Confluence for our intranet and I'd like to create a URL link that goes to an external forms tool like Google Forms, Wufoo, etc.  BUT I want to pass the Confluence username as a parameter in the URL so it can be auto-filled into a field value in the target form.  That way, I won't have to ask the user for their Name when they fill out the form.

Example URL:  http://www.wufoo.com/myformname&name=JSmith

Thanks in advance for any suggestions

-chris

2 answers

1 vote
Stephen Deutsch Community Champion Jan 04, 2016

Pretty easy with a user macro:

## @noparams
<a href="http://www.wufoo.com/myformname&name=${req.remoteUser}">Fill in form</a>

You should be able to adapt it for your needs smile

Thanks, that did the trick.

Hi Stephen,

 

If i want to pass username and password then what should be the URL 
as i am using iframe to show case data in Confluence.

 

Please let me know 

 

Thanks,

Rohit

If you have the Run Self Service Reports add-on, here is one approach:

  1. Add a Run without a user form macro to your page
  2. Embed the link you want to display. 
    1. It is a Web link.
    2. In the address field put http://www.wufoo.com/myformname&name=$current_user_name

You can see the other variables available for substitution at https://bobswift.atlassian.net/wiki/display/RUN/Pre-defined+variables

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,547 views 25 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you