APIs & Integrations

Tathagata_Bhowm
Member

Inline validation message in hubspot embed forms

Hi
I am using embed codes from hubspot in external sites. Previously I was using API v1, then the inline validation messages were working but after I upgraded to v2 those messages seems to not work anymore? Is there any settings I am missing? Pls suggest

0 Upvotes
5 Replies 5
dan_hmonks
Member

Inline validation message in hubspot embed forms

Hello, we can build custom field validation and can customise any form elements to our need, we need to take help of javascript or jquery to achieve same. you can make fields hidden and can pass information to these hidden field, by javacript code. We need to append fields inside form using jquery, once user enters information in these appended fields, we can validate and give custom message, once we are through validation, fields information is send to hidden fields.

Let us know if you need any help with a demo.

Thanks

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Inline validation message in hubspot embed forms

Hi @Tathagata_Bhowmik

Custom field validation is no longer supported with the v2 embed code, and while it might be possible to add custom validation to the form manually using the onFormReady function in the embed code, any custom function you add would be working against the built-in validation/submission function of the form. If you need custom validation, your best bet would be to use a custom form, and use the Forms API to send the data to HubSpot.

Submit data to a form | HubSpot Forms API

POST https://forms.hubspot.com/uploads/form/v2/:portal_id/:form_guid - Send form submission data to HubSpot. Form submissions from external sources can be made to any registered HubSpot form. You can see a list of forms on your portal by going to...

0 Upvotes
Tathagata_Bhowm
Member

Inline validation message in hubspot embed forms

Hi @dadams
I came across this link http://designers.hubspot.com/blog/new-hubspot-forms-embed-code, which says that inline validation message is supported by hubspot externally embedded forms. Is this post referring to v1? In my case, the validation popups were working when it was v1, but after switching to v2 they are not working.

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Inline validation message in hubspot embed forms

I believe those parameters were for the older v1 embed code. Some of the parameters changed with v2, and you can find the current list of supported parameters for the v2 code here:

How to customize the form embed code

This is a list of options that you can use if you just need to tweak a default hubspot form. If you need complete control over the styles and actions of your form, you will still want to use the Forms API.

0 Upvotes
Tathagata_Bhowm
Member

Inline validation message in hubspot embed forms

It seems v2 does not have the support for inline validations, do I need to do some custom coding for this?

0 Upvotes