Display Specific Field Values Based on Another Field Value Selection
Asked by Bhanu Prakash:

Hello All,  
I am a Jira admin for Jira Cloud.   
I have created a JSM Project and Customer Portal.  
In my Customer Portal form - I have 2 custom fields 1. Product 2. Module which are single select drop down fields where Product has A,B,C as values and Module has 1,2,3,4,5,6,7 as values.  

both fields has been added to portal request forms. Now when customer selects A from Product field then Module should only display 1,2,3 as option to select. and When B is select by the customer then Module should display 4,5,6 values.  

I got to know that this can be achieved by Extension for Jira Service Management Plugin so I installed the Trail Free version for 30 days. but I am unable to do this. Can anyone help me with this.  

how this can be achievable using script runner


Answers:
author: Bruna Silva
body: Hello [@Bhanu Prakash](/t5/user/viewprofilepage/user-id/5545376),

Thank you for reaching out to Atlassian Community!

To dynamically show/hide fields, you can use **Forms** under *project settings* in your service project. However, it is currently not possible to have options conditionally show/hide in a field when using forms and we have a feature request asking for this ability:

* [Form Conditions: More possibilities with conditions](https://jira.atlassian.com/browse/JSDCLOUD-10780)

Please, feel free to click on "*Vote for this issue*" and add yourself as a watcher to be kept informed about the state of the feature moving forward.

Therefore, when using forms to achieve your desired scenario, you can use two **Module** fields (with different options) that will be displayed conditionally according to the option selected under the **Product** field. If this approach aligns with your needs, follow these steps to create your form:

1. From the navigation on the left, select *Project settings* \> Forms \> Select *Create form*.
2. Enter a form name with your desired form name.
3. Add fields by selecting *Fields*, and then select your desired field type.
4. Edit a field's details by selecting the field and configuring it in the right-hand panel that appears. [Learn how to link a form field to a Jira field](https://support.atlassian.com/jira-service-management-cloud/docs/link-a-form-field-to-a-jira-field/).
5. To group fields into sections, select *Section*, and drag and drop a section element above (and another section element underneath) your desired field groups.
6. To make a section appear conditionally based on the data entered in a previous field, select the section above the fields you want to appear conditionally and enter the conditions in the panel that appears on the right. You can see more details about how to do it [here](https://confluence.atlassian.com/jirakb/add-a-conditional-field-to-your-project-using-forms-1188419353.html).
   * For a section to be conditional, the preceding field must be a *radio* , *checkbox* , or *dropdown* field.
7. You can use the toolbar at the top to add elements, like tables, columns, information boxes, and more.
8. To see what your form looks like, and test any conditional logic and validation, select *Preview*.
9. You can add a form to the portal form for a request type by following the steps described [in this document](https://support.atlassian.com/jira-service-management-cloud/docs/add-a-form-to-the-portal-form-for-a-request-type/).
10. When you're finished building your form, select *Save changes*.

You can see more details about **Forms** in the documentation below:

* [Use forms in Jira Service Management](https://support.atlassian.com/jira-service-management-cloud/docs/use-forms-in-jira-service-management/)

If you have any other questions regarding this matter, please let us know.


Tags: cloud

jira-service-management

jira-service-management-cloud