38
edits
Changes
→To make a field conditionally mandatory
When using this method, ensure that "Allow Empty" is selected for this field.
==To make a check box field conditionally mandatory==
If you wish to make a check box field mandatory ''only if'' the value ''Yes'' is selected from a dropdown field, for example, use:
isChkSelected(frm.cf_''fieldid'') || frm.cf_''fieldid''.value!="Yes".
in the JavaScript validation setting where:
1) isChkSelected(frm.cf_''fieldid'')= this (frm.cf_''fieldid'') is the field id of the check box field to be made conditionally mandatory.
2) frm.cf_''fieldid''.value= this cf_''fieldid'' is the [[Custom Field ID|custom field ID]] of the dropdown field.
==See Also==