How to submit a form inside a gadget

Hi all,

I am newbie to JIRA gadgets. I have created a JIRA gadget with the help of the tutorials.Will i be able to insert a form inside gadget and submit it? In that case what should be done to create a form inside the gadget. Upon clicking the submit button how this should be processed? how should the result be displayed inside the gadget? What about prepopulated fields like <select> field . How can the data be prepopulated upon displaying the gadget? Please give me some hints

3 answers

1 accepted

Yes we have to write the html form code within the gadget.xml

We need not use the form tag. Instead ajax calls can be done to submit the data

You should certainly be able to do this. The gadget view is constucted using html elements and the interaction with server is done using REST. When you submit the form, you will have to use Ajax to capture the results and render it properly on the page. Easier said than done ;)

0 vote

You should certainly be able to do this. The gadget view is constucted using html elements and the interaction with server is done using REST. When you submit the form, you will have to use Ajax to capture the results and render it properly on the page. Easier said than done ;)

I understand that in the gadget.xml we should write javascript for displaying the datas. Will i be writing the whole html form code within the gadget.xml? Is there any good example ?

I understand that in the gadget.xml we should write javascript for displaying the datas. Will i be writing the whole html form code within the gadget.xml? Is there any good example ? Also you said about submitting the form. Where and how would i handle the ajax call? how to i process and give back the result.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

65 views 0 11
Read article

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