I not seen a solid answer if your can set field as required - in this case a date field based on the choice of a preceding radio button.
One post had that you could not do it with form calc, that it would have to be JS.
I am not the best at that. The form will be submitted via post to a web server for data capture.
Any assistance would be appreciated.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Yes, you can change the "required" status of a field(s) using the validate.nullTest in either Formcalc or Javascript. You could use script like this in the exit event of the radio button:
if (this.rawValue == 1) then
DateTimeField1.validate.nullTest = "error"
else
DateTimeField1.validate.nullTest = "disabled"
endif
"error" sets the referenced field to required; whereas "disabled" changes it back to not required.
Good luck,
Niall
Views
Replies
Total Likes
Hi,
Yes, you can change the "required" status of a field(s) using the validate.nullTest in either Formcalc or Javascript. You could use script like this in the exit event of the radio button:
if (this.rawValue == 1) then
DateTimeField1.validate.nullTest = "error"
else
DateTimeField1.validate.nullTest = "disabled"
endif
"error" sets the referenced field to required; whereas "disabled" changes it back to not required.
Good luck,
Niall
Views
Replies
Total Likes