0

I was not sure that you can only select one radio button. Currently both responses are being collected. enter image description here

Any help appreciated.

 <div class="sc-formfield-input"><label>&nbsp;<!-- Just Blank--></label>
   <label class="Checkbox">
   <input type="radio" name="No" data-field-type="Boolean">&nbsp;Will Not Attend 
     <input type="radio" name="Yes" data-field-type="Boolean">&nbsp;Will Attend
   </label>
3
  • Please edit your post to describe how this is related to Salesforce and what functionality you are using. Jul 29 at 22:43
  • @DavidCheng It's CloudPages.
    – sfdcfox
    Jul 29 at 22:54
  • Yes, it's the cloud pages in the marketing cloud.
    – calo
    Jul 29 at 23:34
1

The "name" must be the same for both input fields; this is what links radio buttons together. Use the "value" to specify the value that should be used.

<div class="sc-formfield-input"><label>&nbsp;<!-- Just Blank--></label>
    <input type="radio" id="willNotAttend" name="attendance" value="No" data-field-type="Boolean">
    <label for="willNotAttend">Will Not Attend</label>
    <input type="radio" id="willAttend" name="attendance" value="Yes" data-field-type="Boolean">
    <label for="willAttend">Will Attend</label>
</div>

You can read more about this behavior in <input type="radio">.

3
  • Thanks, sfdcfox. It did fix the problem with radio button but introduce another problem. Now the responses from both radio buttons are no longer registering in the data extension. I am guessing changing the name to same affected both?
    – calo
    Jul 29 at 23:34
  • @calo Unfortunately, I don't know enough about Marketing Cloud to know how to fix that problem. I just knew how to fix the current problem, since that's just basic HTML.
    – sfdcfox
    Jul 30 at 0:07
  • Thanks, sfdcfox. This was still helpful.
    – calo
    Jul 30 at 0:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.