I have used Jira/JSM forms for a while now to build request forms. My users love how I can build forms based on the users selections. However, I ran into a new request today. Someone wants a field to be required or not required (but displayed either way) based on previous selections. Any help would be greatly appreciated!!
Scenario:
Field A - drop down with yes/no
Field B - open text
If the user selects yes in Field A, then Field B is required. If the user selects no in Field A, Field B is still displayed, but not required.
Is the field that they want to be required/not required based on previous answer linked to a Jira field? If not then you could add two sections that are conditional with one section making the field required. Without using sections you cannot make the field required/not required.
Unfortunately, Field B is linked to a Jira field. This is an opportunity for Atlassian to improve their product. Thanks for taking the time to respond!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You bases showing of a field based on a selection, you need to use a section in a From.
The section should be conditional based on the choice provided. This can be that the field is shown ob either choice, but you can't set it to required, this is only possible when the section shows the field conditionally (so based on the choice of the related field).
Your solution is to have 2 sections and conditionally base them on choice Yes or No then add an open text field, then you could always show the field (if this is not linked to a Jira field) and have one mandatory and the other not.
For me the question is why show this field on selection "No" if it's not mandatory. In my opinion you will use the section option to show field you would like to be provided based on previous choices.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the advice. The requirements from the form requester is Field B should still appear if the user "wants" to put information in there when they select No. But, information in Field B is required if they say Yes.
And, unfortunately, both fields are linked to Jira fields. I suppose I could just create two separate Field B fields and name them on the form with the same name. So as far as the submitter is concerned it would say Field B. But, in Jira there would be two separate Field B1 and Field B2. I'll take that back to the form requester. Thanks for the help thinking outside the box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another idea that was proposed was to have a label on the form just above Field B that says "Field B is required" and will be displayed if the user selects Yes and not displayed if they select No. It doesn't actually require the user to put information in Field B. But, it does inform them that it's required.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.