Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Adding form fields to a macro

Steve Goldberg
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.
August 2, 2012

I'm using a macro that lets you search for a user's permissions simply by entering a username into the macro. It works great. However, I'd really like the ability for users simply to enter a username into a form field, hit a button and then the search runs WITHOUT them needing to edit the page and enter it into the macro itself.

I'm pretty good with HTML but I haven't used form fields in absolutely ages and I don't know how to get them to interact with Confluence macros. I think the ideal solution would simply be for the onclick action to set a variable which contains the text contained in the text field. I'm also not sure if JS would be required to 'reload' the macro once this information is gathered. Any help would be appreciated.

1 answer

0 votes
Amalia
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.
August 2, 2012

I think it can be achieved by using this plugin: https://bobswift.atlassian.net/wiki/display/RUN/Run+macro

You can create an input/text field and a button with the plugin. When the button is clicked, the sql query is run and showing the results :)

More on that: https://bobswift.atlassian.net/wiki/display/RUN/Confluence+Run+Plugin

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events