Get form field values in formValidateBeforeSubmit
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2016 01:52 PM
in the JavaScript body of a formValidationBeforeSubmit how do I the value of form fields for my validation code? Probably simple, but I'm not finding it.
Thanks
Thanks
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2017 07:13 PM
Hey Chuck,
Actually this is a harder problem than I expected, but as you summized, there is a helper function available to retrieve a form field by it's ID.
Below is the code I put inside a "formValidateBeforeSubmit" function:
var thisUn1 = scope.findFormFieldWithId(scope.allFormFields, 'label1');
var thisUn2 = scope.findFormFieldWithId(scope.allFormFields, 'singleentry');
alert(thisUn1.id + ":" + thisUn1.value);
alert(thisUn2.id + ":" + thisUn2.value);
Hope this helps,
Greg
