Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a button on a JSM Form and add fields on the click event of that button ?

Rahul Mishra April 4, 2025

I want that when the user clicks on "Add Row" button they should be able to add another row where they can select Product/Configuration/Quantity. 

JSM-Form.png

1 answer

1 accepted

6 votes
Answer accepted
Nikola Perisic
Community Champion
April 4, 2025

Welcome @Rahul Mishra 

You would need to create a custom Forge app that has a component of Button and the logic that will add another row. Currently, there isn't a feature that supports something like this. Alternatively, you can create a conditional section that based on the selected radio button (example: Would you like to create another row? Here there would be two radio buttons with either yes or no options.If user selects yes, the same section would need to be copied and pasted like from your picture).

Rahul Mishra April 4, 2025

Thank you so much. It seems that radio button option is something that can meet my requirement.

"Forge app" is something new for me.

Nikola Perisic
Community Champion
April 4, 2025

@Rahul Mishra One thing to add is within your form, first you would need add something like "Would you like to generate another product information?" (or something similar), and here you would add the two radio buttons which will after that contain a section which will be conditional - if the user clicks on yes then you would copy and paste the data from your screen shot. After that you would have to create that question again with two radio buttons and the same section.

Forge is a development framework developed by Atlassian. It requires you to have some coding knowledge in JavaScript, React and Node.js - you can find more about it here: https://www.atlassian.com/blog/developer/get-started-with-forge-for-jira-service-management

Rahul Mishra April 4, 2025

Thanks @Nikola Perisic 

It seems that I need to go for Forge only. Since I need to capture the values entered by User against Product/Configuration/Quantity and I have mapped these form fields to the JIRA Custom Fields but when I add another row with the same combination I can not link the form field with custom field as they are already linked in the first row only more over I can not restrict the user to add only a few rows.

Thanks for sharing the forge link, I do have a bit of development background but not in React and Node.js. 

Nikola Perisic
Community Champion
April 4, 2025

@Rahul Mishra yeah, custom forge development might do the trick. For practising you can try some of the AI agents: ChatGPT, Cursor and Mistral AI. Just don't use your production environment for the AI agents, only your practise environment. If you found my answer helpful,kindly accept it.

Like Rahul Mishra likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events