I have made a form using form_for tag. I have to make a check_box field with inline label like
[checkbox] Please check this option
I have been trying many options which worked for me before but this time it is not visible even. When I inspect element I get values like this.
= f.check_box :is_subscribed, :type => "visible", :value => "1", :checked => "1", :label => "Check here"
The output is like this
<input name="subscription[is_subscribed]" value="0" type="hidden">
<input value="1" name="subscription[is_subscribed]" id="subscription_is_subscribed" type="checkbox">
How is this hidden value showing here. I will be really thankful if someone helps me out here. I am using Ruby2.2.0 Rails 4.2
Aucun commentaire:
Enregistrer un commentaire