onchange client script reverse
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I'm writing client script -
my requirement is simple: if the category is 'software' then make 'description' field hidden. It is working fine, but I want to write reverse if, and I stuck there! When Im changing the category to some other, the description field is not visible.
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10 hours ago
Hi,
I suggest you to use UI Policy for this
Condition = category = software
UI Policy Action:
Add entry for Description and set visible to true
Note: UI Policy will reverse automatically
If you are using Client Script, then it should be a onChange Client script on variable category.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if (newValue == "software") {
g_form.setVisible("description", false);
} else {
g_form.setVisible("description", true);
}
}
Thank you,
Palani
Palani