SOLVED

Can we build two step form in marketo by using custom JavaScript?

Go to solution
SanfordWhiteman
Level 10 - Community Moderator

Re: Can we build two step form in marketo by using custom JavaScript?

Your config doesn’t match the fields on the form.

 <script>
var userConfig = {
   buttons: {
      prev: {
         label: "Back",
         disabled: false
      },
      next: {
         label: "Next"
      }
   },
   requiredFields: [
 {
         name: "surveyQuestion1",
         message: "This field is required."
      },

        {
         name: "surveyQuestion20",
         message: "This field is required."
      },
    ]
};
</script>

 

Also I urge you to recheck Form Editor as you’ll see the radio buttons are marked required there, confounding your tests.

Jay_Jiang
Level 10

Re: Can we build two step form in marketo by using custom JavaScript?

In short yes it can be done.

If you're struggling with a marketo only form, and all else fails, build your own form and submit the answers to marketo in the background

Sant_Singh_Rath
Level 7

Re: Can we build two step form in marketo by using custom JavaScript?

Thanks for the suggestion Jay Jiang​. I will try to get this work.

Best regards,
Sant Singh Rathaur
SanfordWhiteman
Level 10 - Community Moderator

Re: Can we build two step form in marketo by using custom JavaScript?

I found my demo from a couple of years ago. Let me just refactor it a bit and will post tomw (uses some techniques I don't use now).

Sant_Singh_Rath
Level 7

Re: Can we build two step form in marketo by using custom JavaScript?

Thanks Sanford Whiteman​ It will be really helpful. Thanks!

Best regards,
Sant Singh Rathaur