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

0 votes
Accepted answer

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 votes

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
Community showcase
Posted yesterday in Canada

Happy New Year - First AUG of the year - great success

Hi Everyone, Hope everyone had a great holiday season and is ready for an exciting 2019.  We had our first AUG last night featuring Tempo Timesheets.  A great presentation and lots of int...

17 views 0 1
View post

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