SOLVED

Progressive profiling fields above required fields?

Go to solution
florenzoNIP
Level 2

Re: Progressive profiling fields above required fields?

This is exactly what I am trying to do! But I am so confused. Can someone send a sample of the code that needs to be edited? And where to access the code in the form? I am very new to Marketo. 

Anonymous
Not applicable

Re: Progressive profiling fields above required fields?

Thanks @Sanford. It gives me plenty to chew on to get forms the way we'd like them. Too bad the tool doesn't have the flexibility to allow more variation of forms.
Jenn_DiMaria2
Level 10

Re: Progressive profiling fields above required fields?

This is an awesome workaround, as I'm trying to do the same thing, but for some reason, I can't get it to work on my end. Is it only the one snippet of code in the rawHTML section that needs to be added?

SanfordWhiteman
Level 10 - Community Moderator

Re: Progressive profiling fields above required fields?

Yes, although that's a really old method and now I'd do it like this:

MktoForms2 :: Reorder Fields

Jenn_DiMaria2
Level 10

Re: Progressive profiling fields above required fields?

Thanks, Sanford! For some reason, this still isn't working for me. Does it matter if you have hidden fields (for URL parameters) or the max number of ProgPro fields you have?

SanfordWhiteman
Level 10 - Community Moderator

Re: Progressive profiling fields above required fields?

What's the URL?

Hiddens and the # of fields aren't important. It's basic DOM manipulation so if there aren't any syntax errors and all the code is in place, it'll work.

Dan_Stevens_
Level 10 - Champion Alumni

Re: Progressive profiling fields above required fields?

Sandy, where would you place this code on a Marketo guided LP?

SanfordWhiteman
Level 10 - Community Moderator

Re: Progressive profiling fields above required fields?

You can place it in a <script> before the closing <body> tag. Alternately, you can put in the <head> as long as you wrap it with

document.addEventListener('DOMContentLoaded', function(){

  // dependent code here

});

Remember to include the remote <script> with id="teknklFormsPlus-0.2.0-tag" as well (it's on the left-hand-side in CodePen).

Jenn_DiMaria2
Level 10

Re: Progressive profiling fields above required fields?

Have you ever run into any issues with this/is there anything in the code that would cause the form to duplicate? We got it working, but the form appears twice on the page (I knew I should've taken that javascript class in college).

SanfordWhiteman
Level 10 - Community Moderator

Re: Progressive profiling fields above required fields?

I assume you're running loadForm() twice. On Mkto LPs, loadForm() is done for you, so if you do it again it'll render the form twice in the <form> tag.