Closed danieldocki closed 9 years ago
Hi Guys,
I'm using SimpleForm. Judge return valid, but radio is not selected.
I suspect he returns valid because the tag 'value' has value, which is 'male' and 'female', have any solutions?
<%= f.input :gender, required: true, collection: [[:male, t('male')], [:female, t('female')]], label_method: :last, value_method: :first, as: :radio_buttons, item_wrapper_class: 'radio-inline', validate: true %>
<div class="form-group radio_buttons required user_gender"> <label class="radio_buttons required control-label"> <abbr title="obrigatório">*</abbr> sexo </label> <span class="radio radio-inline radio__label"> <input class="radio_buttons required form-control" data-validate="[{"kind":"presence","options":{},"messages":{"blank":"não pode ficar em branco"}}]" data-klass="User" type="radio" value="male" name="user[gender]" id="user_gender_male"> <label class="collection_radio_buttons" for="user_gender_male">papai</label> </span> <span class="radio radio-inline radio__label"> <input class="radio_buttons required form-control" data-validate="[{"kind":"presence","options":{},"messages":{"blank":"não pode ficar em branco"}}]" data-klass="User" type="radio" value="female" name="user[gender]" id="user_gender_female"> <label class="collection_radio_buttons" for="user_gender_female">mamãe</label> </span> </div>
Thanks :)
Thanks for the bug report. I'm going to close this because it was already reported here: https://github.com/joecorcoran/judge/issues/33
Hi Guys,
I'm using SimpleForm. Judge return valid, but radio is not selected.
I suspect he returns valid because the tag 'value' has value, which is 'male' and 'female', have any solutions?
Thanks :)