SOLVED

Re: Map Radio Button Options to Multiple Fields

Go to solution
Chris_Vanderma1
Level 4

Map Radio Button Options to Multiple Fields

Hi everyone. Hoping I can get some help on this issue.

Lets say in Marketo I have Field A (Boolean) and Field B (Boolean). I want a form to have two radio buttons and a requirement of the completion of the form to be that one of the two radio buttons must be selected. Either Field A can be true and Field B can be false or Field A can be false and Field B can be true, but the form should not allow both Fields to be true or both fields to be false. Any ideas on hwo to approach this?
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Chris_Vanderma1
Level 4

Re: Map Radio Button Options to Multiple Fields

Thanks for the feedback.

I don't expect that the form itself will enforce this logic. We don't have an in-house JS developer and don't have the time of resources to use a contractor, so it's safe to eliminate that option.

My fear was that I would need to add a field C and several smart campaigns to implement the logic. This strikes me as more complaicated than it should be.

I like the solution Scott proposed. Just to make sure I'm understanding it correcly, I would set-up my form with the boolean field A as radio buttons. I could then label the radio buttons as:

o - Say yes to Field A
o - Say yes to Field B

When the user selects the second radio button and presses submit they aren't actually setting Field B to true, they are actually setting Field A to false. A smart campaign listens for the form to be filled out and the action it takes upon completion should be slightly different than what Scott said (I think):
  1. IF Field A value is True, Chage Field B value to False
  2. IF Field A value is False, Change Field B value to True
  3. Else do nothing
Does this make sense? I think the difference between what Scott said and what I have is that Scott was assuming that there would be four radio buttons on the form; a T/F for each Field, when in fact I want only two radio buttons, as stated above.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Re: Map Radio Button Options to Multiple Fields

Hi Chris,

You could force a data value change based on Field A being true or Field B being true in a smart campaign. 

Your smart campaign would listen for a form to be filled out with a Fills Out Form trigger (you could also gate it further by limiting it to a specific page you want to monitor). Next in the flow step, you would select  a Change Data Value action with choices:
  1. IF Field A value is True, Chage Field B value to False
  2. IF Field B value is True, Change Field A value to False
  3. Else do nothing
As a safeguard, you should also create a smart campaign to listen for data value changes on Fields A/B being changed from False to True and automatically setting the opposing data value like you want, should that form be used by the customer again. 

I feel like there might be a better answer out there, but using the method above, you should be able to get the desired effect.

Hope this helps, and good luck!
Josh_Hill13
Level 10 - Champion Alumni

Re: Map Radio Button Options to Multiple Fields

This may work if you setup the Field Visibility as Scott describes.

If you want the Form itself to enforce this requirement to the Lead, you may need javascript.
Anonymous
Not applicable

Re: Map Radio Button Options to Multiple Fields

Agree with Josh. JS is probably the most elegant for your requirements.
Chris_Vanderma1
Level 4

Re: Map Radio Button Options to Multiple Fields

Thanks for the feedback.

I don't expect that the form itself will enforce this logic. We don't have an in-house JS developer and don't have the time of resources to use a contractor, so it's safe to eliminate that option.

My fear was that I would need to add a field C and several smart campaigns to implement the logic. This strikes me as more complaicated than it should be.

I like the solution Scott proposed. Just to make sure I'm understanding it correcly, I would set-up my form with the boolean field A as radio buttons. I could then label the radio buttons as:

o - Say yes to Field A
o - Say yes to Field B

When the user selects the second radio button and presses submit they aren't actually setting Field B to true, they are actually setting Field A to false. A smart campaign listens for the form to be filled out and the action it takes upon completion should be slightly different than what Scott said (I think):
  1. IF Field A value is True, Chage Field B value to False
  2. IF Field A value is False, Change Field B value to True
  3. Else do nothing
Does this make sense? I think the difference between what Scott said and what I have is that Scott was assuming that there would be four radio buttons on the form; a T/F for each Field, when in fact I want only two radio buttons, as stated above.
Anonymous
Not applicable

Re: Map Radio Button Options to Multiple Fields

Hi again Chris,

In the customer-facing layer, you would build it exactly as you described above. The smart campaign required would be listening for a "True" value entered from the user, and enforce the "False" value desired for the other field.

Best of luck with your form!
Chris_Vanderma1
Level 4

Re: Map Radio Button Options to Multiple Fields

Thanks, Scott!

I have now implemented this solution and testing thus far has been flawless.