Progressive Form Substitution... With a Twist | Community
Skip to main content
New Participant
May 18, 2020
Solved

Progressive Form Substitution... With a Twist

  • May 18, 2020
  • 1 reply
  • 3779 views

Marketing would like to create a 3-step process to get someone to register for a demo. Here's a simple outline. 

 

Step 1:

Email Address

 

Step 2:

First Name

Last Name

Solution Interest

 

Step 3 - depends on the answer to Solution Interest above:

Interest1: 

- Company Name

- Current Tool

- Timeline

- Team count

 

OR

Interest2:

- Company Name

- Number of Agents

- Digital Channel

 

OR

Interest3:

- Company Name

- Primary community

- Number of customers

- Timeline

 

You can see that steps 1 and 2 are straightforward. Step 3 shows some common and some different fields depending on the answer to "Solution Interest" in Step 2. For Step 3, I was originally thinking that I could just set up using visibility rules on the third form but there are some fields in common between the various options and for any given option, the fields in that area need to be required but you run into challenges if a required field is hidden. 

 

@SanfordWhiteman has this neat code that allows multiple forms to be strung together: Marketo Forms2:: Progress Form Substitution  but it doesn't quite get me there as I think that Step 3 needs to be a different form based on the answer to the Solution Interest question in Step 2. 

 

Clearly I'm looking for the least amount of Javascript coding. Thinking that Sandford's code is a good start but wondering if there is an easy way to change out the third form based on the Solution Interest field after the second form?

 

Suggestions are appreciated!

 

Thanks,

Sheila

 

 

 

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 SanfordWhiteman

Glad you asked!

 

I just updated the code in the Progressive Form Substitution CodePen to help with your requirements.

 

Just add the fields you want to the forwardFields array in the config block.

 

In the CodePen you can see it has the example values:

forwardFields : ["Email", "Title"]

 

That will forward those 2 fields from form to form (as Hidden fields). Previously it was hard-coded to only pass Email.

1 reply

SanfordWhiteman
New Participant
May 18, 2020

... fields in that area need to be required but you run into challenges if a required field is hidden. 


That's true — if the field is actually hidden (Hidden type) and doesn't have a value. But Visibility Rules don't create Hidden fields! They don't include non-visible fields in the form at all, so they don't interfere with validation.

 

So at that level, I think you can use my Progressive Form Substitution code. Include the Solution Interest as a hidden field, and use that as the condition in your Visiblility Rules.

 

However, the remaining problem may be that you don't have native Pre-Fill available for that field Solution Interest. Is this on a Marketo LP?

SheilaBAuthor
New Participant
May 19, 2020

Thanks @sanfordwhiteman 

The forms will be embedded on a non-Marketo landing page so native prefill won't be available. How can I make the Solution Interest field hidden on the 3rd form and still ensure it is populated with the right value going directly from form 2 to form 3?

Thanks again,

Sheila

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
May 19, 2020

Glad you asked!

 

I just updated the code in the Progressive Form Substitution CodePen to help with your requirements.

 

Just add the fields you want to the forwardFields array in the config block.

 

In the CodePen you can see it has the example values:

forwardFields : ["Email", "Title"]

 

That will forward those 2 fields from form to form (as Hidden fields). Previously it was hard-coded to only pass Email.