Greetings there!
Use Case -
So field A is a single select containing only two options: "Yes", "No".
Field B is a paragraph field.
Expected behavior -
- If user selects "Yes" in field A, field B becomes visible. Otherwise, if field A is "No" or empty, then field B is hidden.
Simple, right? :) But I can't get it to work!
The following script works when Field A is a multi-select, but not for a single select.
So on attempting to make thids work I thought this should, but it doesn't for some reason:
Any insight will be greatly appreciated.
Cheers!
Hi @Ricardo_Gomes ,
Thanks for posting this. I'm Avinash, from Appfire's Product Support team.
Please use the sample script below. When the single select field value is "Cloud", it will display another field. If the value is empty or not equal to "Cloud", it will hide the field. Remember to change the custom field ID according to your instance.
const customField = getFieldById("customfield_10094");
const customfieldvalue = customField ? customField.getValue() : null;
if (customfieldvalue && customfieldvalue.value === "Cloud") {
getFieldById("customfield_10096").setVisible(true);
} else {
getFieldById("customfield_10096").setVisible(false);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.