Forums

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

How to repeat form elements conditionally in a JSM form, "Add Another"

Jennifer ONeill
Contributor
July 20, 2023

This is like an "Add Another" function. In this scenario, user is requesting multiple tracking links. The form for a single tracking link has many conditional fields to complete. If the user wants to request another tracking link, I'd like to repeat the same set of sections and fields. Business prefers not to have a single request ticket per tracking link, but if we have to implement that way we will.

 

Has anyone done this before? I have been trying and am running into issues. Maybe it's due to having the same section names? not sure, but hoping someone has a solution :)

1 answer

1 vote
John Funk
Community Champion
July 21, 2023

Hi Jennifer,

Sorry but this is very unclear to me. Can you explain in more direct terms? 

Jennifer ONeill
Contributor
July 21, 2023

A user has a request to create multiple links. Each link request has many conditional fields associated with it. Rather than submit 5 different request tickets, looking to "Add another" in the same form. If yes, the same set of conditional fields display for the next link request.

Let me know if that makes sense. Thanks

Like # people like this
John Funk
Community Champion
July 22, 2023

You are trying to link the issue directly on the form? If so, how are you doing that now? 

Jennifer ONeill
Contributor
July 24, 2023

OK, maybe the word link is confusing. Its a user requesting a new branded URL. they fill out the JSM request form for the single URL request. If they want multiple URL's rather than submitting multiple request tickets, I'm looking for a way to "Add another" which would essentially duplicate the form fields again for the new URL request.

Like John Funk likes this
John Funk
Community Champion
July 25, 2023

Okay, gotcha. If there is a reasonable limit to how many, I have a client how has a field that asks for how many up front that they want to add. Make them choose from a drop down. If the answer is 5, then have a conditional section that says if the answer to that field is any of 1, 2, 3, 4, or 5 then show this field which would be URL 2.

You would do that same thing for all 5 URL fields. They would only appear depending on how many they say they need. 

Jennifer ONeill
Contributor
July 26, 2023

I actually tried something similar. I used Yes/No and if Yes, I copied the same form fields below into a new conditional section. But for some reason it did not work. Wondering if there is an issue with duplicate section names.

The initial set of form fields for a single request has multiple conditional sections. Just copying that set of conditional form field elements and pasting to the new "Yes/No" section if Yes didn't seem to work. 

Suggest an answer

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

Atlassian Community Events