I'm trying to create a custom form module that takes the input and calls an API with the information given in the form on submit. I've embedded the code from the form builder, but I'm not sure how to retrieve that values of the inputs.
A previous post suggested something along the lines of
The format you are showing is selecting a DOM input element with that specific value.
When you do:
$('input[value="{{formFieldValue}}"]')
This would select a form field where the user had literally entered "{{formFieldValue}}". If you are instead trying to grab a specific form field regardless of what the value is, to test the value against other possibilities, then you would do something like this:
Where {{Internal-Property-ID}} is replaced with the internal id of the property on the form. Which you can find in the form builder by looking for the italicized text:
So if I wanted to grab the value of that field, from within the onFormSubmit function, I would use:
The format you are showing is selecting a DOM input element with that specific value.
When you do:
$('input[value="{{formFieldValue}}"]')
This would select a form field where the user had literally entered "{{formFieldValue}}". If you are instead trying to grab a specific form field regardless of what the value is, to test the value against other possibilities, then you would do something like this:
Where {{Internal-Property-ID}} is replaced with the internal id of the property on the form. Which you can find in the form builder by looking for the italicized text:
So if I wanted to grab the value of that field, from within the onFormSubmit function, I would use: