Issues with customizing error message on form embed code

Highlighted
New Contributor

Hello!

 

Using a hbspot form which requires the user to input and submit an email.

I'm trying to change the error message when a user tried to submit an incomplete/invalid email. I've been using the guide on How to customize the form embed code on Hubspot, following this format: 

 

hbspt.forms.create({

         portalId: '',

         formId: '',

         locale: 'en',

         translations: {

                en: {

                       blockedEmail: "Please enter a valid email address",
                       }
              }
    });

The customizations for the error messages are not registering when the user clicks the submit button. For example, the error message still reads "Please change your email address to continue" (which is the default) instead of "Please enter a valid email address" (as shown in the my code above). However, the customized error message for keys like "invalidEmailFormat" works - and is displayed while the user is typing in the email field.

 

Basically, the customizations don't work on keys that are called after the submit button is clicked.

 

Would appreciate any suggestions!

Reply
0 Upvotes

0 replies

No replies on this post just yet

No one has replied to this post quite yet. Check back soon to see if someone has a solution, or submit your own reply if you know how to help! Karma is real.

Reply to post

Need help replying? Check out our Community Guidelines