SOLVED

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

Go to solution
debbie_917
Level 2

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

@SanfordWhiteman 
One more thing. It's not a HUGE issue, but after clicking submit. Both buttons say "Please Wait" Is there a way to have the back button hide after submit?
https://codepen.io/debbie_917/pen/KKYdeJR

 

SanfordWhiteman
Level 10 - Community Moderator

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

MktoForms2.whenReady(function(readyForm){
  readyForm.onSubmit(function(submittingForm){
    submittingForm.getFormElem().find("button.mktoButton[data-dir='prev']").hide();
  });
});
debbie_917
Level 2

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

Thank you @SanfordWhiteman! Have a wonderful day.

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