How to submit a form inside a gadget

Kannan S October 21, 2013

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
Answer accepted
Kannan S December 1, 2013

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

0 votes
Jobin Kuruvilla [Adaptavist]
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.
October 21, 2013

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 ;)

Kannan S October 23, 2013

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 ?

Kannan S October 23, 2013

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.

0 votes
Jobin Kuruvilla October 21, 2013

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 ;)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events