SOLVED

Re: Need a form field to be required dependent on value of other field

Go to solution
Mary_Skuse
Level 1

Need a form field to be required dependent on value of other field

I'm creating a form where I need the lead to fill out at least one of two fields. Is there a way to make them required based on the value of the other field? For example, they need to give us value A and/or value B.

Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Need a form field to be required dependent on value of other field

Use the code from the JS pane at

 

MktoForms2 :: Min/Max Filled

 

Just set the field names, the min/max non-empty fields (min of 1 and max of Infinity in the case you described), and error message, as in the demo.

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Need a form field to be required dependent on value of other field

To be clear, two Text type fields?

Mary_Skuse
Level 1

Re: Need a form field to be required dependent on value of other field

They are Number fields. We also use Salesforce if that makes any difference.

SanfordWhiteman
Level 10 - Community Moderator

Re: Need a form field to be required dependent on value of other field

Use the code from the JS pane at

 

MktoForms2 :: Min/Max Filled

 

Just set the field names, the min/max non-empty fields (min of 1 and max of Infinity in the case you described), and error message, as in the demo.