Marketo form custom validation in backend | Community
Skip to main content
New Participant
July 24, 2020
Solved

Marketo form custom validation in backend

  • July 24, 2020
  • 2 replies
  • 3322 views

Hello sir,

I want to set up a custom validation for form. Currently, we are using that validation code on the template page but I need to move that code in form backend side so it will work for every page wherever I have used that form. Where can I upload that code on the backend side? 

Give an example. Like I want to restrict the user to enter the @gmail account while filling the form. How can I do it Marketo level instead of form or page level?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Harish_Gupta6

Unfortunately No. You need to add it either on each form level in Rich text or add it to the lp template. 😞 

 

There is one idea but I never tried this 🙂 

 

You can create a RICH text token and add the script in it. And then use the token on the LP template or when anyone tries to create the page then add the token in the custom head. 

 

Thanks

 

 

2 replies

SanfordWhiteman
New Participant
July 24, 2020

Adding custom JS behaviors via a Rich Text area isn't as simple as just pasting the script. There's an additional, critical step, as detailed in this blog post: https://nation.marketo.com/t5/Product-Blogs/HOWTO-Add-Forms-2-0-JS-behaviors-inside-a-Rich-Text-Area/ba-p/242768

Harish_Gupta6
New Participant
July 24, 2020

In your form in Marketo, use RICH TEXT and then click on the HTML icon and add your script.

 

 

 

 

Harish Gupta
New Participant
July 24, 2020

Thanks for the reply. I have one more query.

I have a lot of forms for different Marketo pages. So, Is there any way to upload the script only once that it will execute for every form?

Harish_Gupta6
Harish_Gupta6Accepted solution
New Participant
July 24, 2020

Unfortunately No. You need to add it either on each form level in Rich text or add it to the lp template. 😞 

 

There is one idea but I never tried this 🙂 

 

You can create a RICH text token and add the script in it. And then use the token on the LP template or when anyone tries to create the page then add the token in the custom head. 

 

Thanks

 

 

Harish Gupta