Re: Form - one question at time & conditionally?

Charles_Sander1
Level 4

Form - one question at time & conditionally?

I'm exploring different options, and wondering if maybe I can do this easily in Marketo.

We want to put a form on our website with multiple choices, and only show one question at a time. There would be two paths, based on the first couple questions: If they chose A, then cycle through questions 1 - 3. If they chose B, give questions 4 - 6. This can be done with conditionals in Marketo. But, it doesn't seem to have an option to hide the previous question or have the submit button not show until they've gotten through all the questions.

I'm wondering if there's any good straightforward way to show just each question at a time, as they work through the form: A choice is made, then they click to the next question (probably better than just automatically showing the next. Then, when the user gets to the end, there are a couple final questions and the submit button.

Doable? Or should I find another way to do this? I'm suspecting a bunch of javascript is needed.

9 REPLIES 9
SanfordWhiteman
Level 10 - Community Moderator

Re: Form - one question at time & conditionally?

Yes, it is possible. I call this the FaaT (Field-at-a-Time) method and there's a demo here: MktoForms2 :: Field-at-a-Time (FaaT) v1.0.1

This is going to be the centerpiece of a Products blog post soon, if you can just hold on for that.

Bryan_Epstein
Level 6

Re: Form - one question at time & conditionally?

Not sure on my end when I would need to use something like this, but this is awesome.

Arjun_NS
Level 1

Re: Form - one question at time & conditionally?

Hello,

I am not able to view the script you created. Page is showing 404 error.

I do have similar requirement.

Case is to avoid duplicate nominations from relationship manager.

Relationship manager will nominate their relation by filling out form for a sponsored concert program.

 

Step 1: Relation info. Relationship manager fills out below info

  • Firstname
  • Last name
  • Company name*
  • Jobtitle*
  • Emailadres

Next> (as they click on next button system should do validation and place alert message on landing pge  if contact is already part of the program and is rejected.  They should not be able to submit step 2 but only go back to change in the relation data.)

 

If relation is not nominated yet after they click on Next, it will go further, and relationship manager can fill in their details hence it will get captured in contact profile.

 

Can you please let us know how we can achieve this .

SanfordWhiteman
Level 10 - Community Moderator

Re: Form - one question at time & conditionally?

Not really the same situation. This is vastly different case as you’re talking about looking up people’s membership in a Program in real-time, not making decisions based on form values. Please open a new thread in Discussions.

Nitish
Level 2

Re: Form - one question at time & conditionally?

Hi @Arjun_NS ,

Here is link you can refer the link created by @SanfordWhiteman 

This is generally a multi step from using JS

As you said you want to that if Relationship manager clicks on next button system should do validation and place alert message on landing pge  if contact is already part of the program and is rejected  

 

I believe this can be done using php on submit by validating the criteria you mentioned .. and yes sanford said right the page will break if you have more than one form      

SanfordWhiteman
Level 10 - Community Moderator

Re: Form - one question at time & conditionally?


I believe this can be done using php on submit by validating the criteria you mentioned .. and yes sanford said right the page will break if you have more than one form      

There is no PHP support in the Marketo platform.

Jay_Jiang
Level 10

Re: Form - one question at time & conditionally?

You always have the option to build your own front end form which passes the final answers to a hidden Marketo form and submits

Avtar_Singh1
Level 2

Re: Form - one question at time & conditionally?

Hi Charles,

Marketo does not provide hide previous question/next question functionality. However, this functionality can be implemented with the Javascript. You can add one more button (Next Question) using the "RichText Field" on the Marketo form and add javascript to hide previous and show the next question until there is a question in the Form. At the last question "Next Question" button will be hidden and the "Submit" button will appear for the Form Submission.

The complete example can be found here.

Best Regards,

Avtar Singh

SanfordWhiteman
Level 10 - Community Moderator

Re: Form - one question at time & conditionally?

You need to constrain your selectors to the current form element only, or this code will break when there is another form on the page. Now you're rooting your search at the document level.