Forums

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

Enabling other fields based on selection on the options in radio button filed

Sam
Contributor
February 21, 2018
Hi, I have a Radio button custom field (Vendor Defect)with "Yes" and "No" options, If I select Yes, i should see other two custom fields( Like vendor name, Vendro info) so that i can fill those fileds with info, if i select No, then no need of seeing that fields. Can someone suggest how do it and provide me the script if possible please.

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Eric Almquist
Contributor
February 21, 2018

We would use a Behavior provided by the Adaptavist ScriptRunner plugin. On the Vendor Defect field, we would define the behavior to execute the following script:

 

def BDCField = getFieldById(getFieldChanged());
def SecOfferingField = getFieldByName("Vendor name");
def ThirdOfferingField = getFieldByName("Vendor Info");

if(BDCField.getValue() == "Yes")
{
SecOfferingField.setHidden(false);
ThirdOfferingField.setHidden(false);
}

 

The Vendor name and Vendor Info fields would be set to hidden in the same behavior.

Sam
Contributor
February 26, 2018

Thanks for the help Eric

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events