Remove/Add Options in a List Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 10:26 AM
I have a List field on a desktop form, not a catalog form. I’d like the selectable options in the List field to be dependent upon the selection made in a Choice List.
For example, if the user selects Category One from the Choice List, I’d like to populate the List field with the several subcategories that fall under Category One. A List field is required because the user may want to make multiple selections.
Incidentally, g_form.removeOption() does not work with List fields.
I’m happy to add or remove options, either way.
Any suggestions on how best to achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 10:44 AM
Hi,
In this case when the category field changes, you need to clear all values selected in the list field
g_form.clearValue('<field name>'); //this works on list field