Forms with initially selected values dependent on visibility rules | Community
Skip to main content
Bryant_Chang
Level 3
May 3, 2017
Solved

Forms with initially selected values dependent on visibility rules

  • May 3, 2017
  • 1 reply
  • 3180 views

Trying to create an opt in field on a form, that has "initially selected" as true if country is US and not "initially selected" if country is Canada.

Is this possible with out of the box forms 2.0 or will we need custom scripting on the pages

I tried creating 2 separate values, one with "initially selected" for one of the values and added visibility rules to only show the initially selected if country is US and the other not initially selected if country is Canada.

But when I select Canada as my country, the value shows correctly but is pre-selected.

Anyone have ideas?

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

Sanford Whiteman hope you had a great trip

It was okay.

I'm assuming the scripting will have to live on the lp template? not in form css?

It would never go in the CSS (being JS and all). It could potentially go in a Rich Text area but I prefer to keep it in an external file or in the template.

An example is here: MktoForms2 :: Dependent Checkbox

1 reply

SanfordWhiteman
Level 10
May 4, 2017

Q should be moved to Products​ (remember, "Central" is for non-product-specific mktg topics).

A is this absolutely can be done but needs a tiny bit of scripting. I'll show you tomorrow but gotta pack for a trip right now...

Bryant_Chang
Level 3
May 17, 2017

@Sanford Whiteman hope you had a great trip

I'm assuming the scripting will have to live on the lp template? not in form css?

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
May 18, 2017

Sanford Whiteman hope you had a great trip

It was okay.

I'm assuming the scripting will have to live on the lp template? not in form css?

It would never go in the CSS (being JS and all). It could potentially go in a Rich Text area but I prefer to keep it in an external file or in the template.

An example is here: MktoForms2 :: Dependent Checkbox