Make a field required based on input in another field
So I have researched the forum to answer the question of how to make certain fields in a form required if a value is entered in another designated field, and not required if no value is entered in the designated field.
For example:
There is a field titled QTY_paper, and if a value is entered into QTY_paper, then the field PROGRow1 should become required.
If no value is entered into QTY_paper, then PROGRow1 is not required.
I've tried both FormCalc and Javascript, but with no results. In FormCalc I added this script as a mouseExit event on QTY_paper:
if ($.isNull == 0) then
//Make the budget field Required
PROGRow1.validate.nullTest = "error";
endif
and then I added this script in FormCalc to the mouseExit event on PROGRow1:
if ($.isNull == 0) then
$.validate.nullTest = "disabled"
endif
This came almost verbatim from another post on the forum, so I'm thinking I'm missing something obvious here... which isn't too odd as I'm still pretty new at adding the scripts. Please help if you can!