SOLVED

Form - multiple selections with fields hidden

Go to solution
Travis_Schwartz
Level 4

Hello, 

 

I was charged with creating a similar form to this:

Unknown.jpeg

Where it is presenting two options

1. either sign up for something or continue to the website.

 

I found the documentation example (https://developers.marketo.com/rest-api/assets/forms/examples/) for form submit on non-form click event and figured that was likely where I needed to be, but am facing a couple of challenges

 

1. How do I make the other fields visibility dependent on selecting the "sign up" option?

2. is this java script code living in a rich text field on the form or on the page where the form exists?

3. how do I assign the element ID? is that in the CSS editing section of the form editor?

 

 

 

Thanks

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

I'm guessing that I need to use API to change the visibility value which will then impact my visibility rules?

Do it like this.

 

The form behind that demo looks like so in Form Editor:

SanfordWhiteman_0-1679095713203.png

With Visibility Rules to control the First Name and Last Name if Active equals “true”.

 


Also, would I be using API to control the visibility of the CONFIRM button?

For that, follow the method at

Conditionally show/disable/hide the Submit button on Marketo forms

View solution in original post

16 REPLIES 16