Community Alums
Not applicable
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 02-21-2022 12:13 AM
This is applicable for client side scripting (both Catalog and table level)
Make them readonly, mandatory or clear all variable/field values when the respective field changes.
var fieldArr = ['Field_A', 'Field_B', 'Field_C', 'Field_D', 'Field_E', 'Field_F'];
//add comma separated field names which you want to clear here
for (var i = 0; i < fieldArr.length; i++) {
g_form.clearValue(fieldArr[i]);
}
//Similarly we can use other methods like - g_form.setReadOnly, g_form.setMandatory or g_form.setDisplay
for (var i = 0; i < fieldArr.length; i++) {
g_form.setReadOnly(fieldArr[i], true);
if (g_form.getValue(fieldArr[i]) == "") {
g_form.setDisplay(fieldArr[i], false);
}
}
Thanks to
- 4,403 Views
Comments
Parth Praveen D
Tera Contributor
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
11-21-2023
03:15 AM
write an on change client script on the select box field and do
g_form.clearValue('your field name'); //replace the field name which you want to clear
please mark my answer correct if it helps you
Stepan Kravciv
Tera Contributor
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
07-10-2025
10:28 PM
You can use g_form.getEditableFields(); instead of the array