We need a way for hubspot to validate a custom form field. If someone were to complete the form and text entered in the form feild already exists, we need to not let them go any further and receive a message. How can we make hubspot validate this free text form field. Help is appreciated!
Hey @swarlop,
As mentioned by cbarley on this similar forum thread,
“we don’t have a very easy way to override HubSpot default validation with custom validation, but you should be able to put your own validation code in the onFormSubmit callback that’s detailed here: https://developers.hubspot.com/docs/methods/forms/advanced_form_options. This thread goes over a few more options: Integration with JQuery Validator - customized validation you may want to explore, as does this Medium article: https://rschu.me/prevent-the-submit-of-any-hubspot-forms-after-a-successful-validation-5e1f230b14f1”
Hope this helps!