Changes

Jump to: navigation, search

JavaScript Validation

19 bytes added, 20:30, 12 March 2014
To make a check box field conditionally mandatory
==To make a check box field conditionally mandatory==
If there is a check box field under a show hide header and you wish to make this check box field mandatory ''only if'' the value ''Yes'' is selected from a dropdown field, Paste the JavaScript below in the JavaScript Validation field on the "Select Many - Check Boxes" field type:<br />
isChkSelected(frm.cf_''fieldid'') || frm.cf_''fieldid''.value!="Yes":<br />
isChkSelected(frm.cf_''fieldid'') || frm.cf_''fieldid''.value!="Yes":<br />
in the JavaScript validation syntax where<br />
1) isChkSelected(frm.cf_''fieldid'')= this (frm.cf_''fieldid'') is the field id of the check box field to be made conditionally mandatory.<br />
Combo box field- Did your organization receive any non-monetary assistance? (1387274)
Options are Yes;No;
If yes is selected than they should answer a mandatory check box field. Non Monetary Assistance chk check box (1378251).
Put this JavaScript in JavaScript Validation on check box field:<br />
isChkSelected(frm.cf_1378251) || frm.cf_1387274.value!="Yes"
38
edits

Navigation menu