I am trying to make radio buttons with simple form. I have the following code:
<%= f.input :payment_method, as: :radio_buttons, input_html:{value: 'venmo', id: 'venmo', style: 'float: left;'}%>
<%= f.input :payment_method, as: :radio_buttons, input_html: {value: 'checking_account', id: 'checking_account', style: 'float: left'}, required: true %>
For some reason, this is creating 4 radio buttons instead of 2 with labels "yes" and "no" that i don't want. Here is what it looks like:
Here is the html that is generated:
<div class="input radio_buttons required freelancer_account_mimic_payment_method">
<label class="radio_buttons required" for="checking_account">
<abbr title="required"></abbr>
Payment method
</label>
<span class="radio radio">
<input id="checking_account" class="radio_buttons required" type="radio" value="true" style="float: left" required="required" name="freelancer_account_mimic[payment_method]" aria-required="true"></input>
<label class="collection_radio_buttons" for="freelancer_account_mimic_payment_method_true">
Yes
</label>
</span>
<span class="radio radio">
<input id="checking_account" class="radio_buttons required" type="radio" value="false" style="float: left" required="required" name="freelancer_account_mimic[payment_method]" aria-required="true"></input>
<label class="collection_radio_buttons" for="freelancer_account_mimic_payment_method_false">
No
</label>
</span>
</div>
How do I fix this so only two radio buttons appear with labels that I choose?