Adding form fields to a macro

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

I think it can be achieved by using this plugin:

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:

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

309 views 11 10
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