Create a dynamic url link in Confluence with username embeded

Christopher Harvey January 4, 2016

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 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

Christopher Harvey January 4, 2016

Thanks, that did the trick.

rohit mat August 2, 2018

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

0 votes
Doug Swartz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2016

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
TAGS
AUG Leaders

Atlassian Community Events