I have this code:
<div class="form-group {{ (isset($errors) AND $errors->has('indicacao_interna')) ? 'has-error' : '' }}">
{{ Form::label('indicacao_interna', 'Indicação Interna', array('class' => 'col-lg-4 control-label')) }}
<div class="col-lg-3">
<div>
<label class='radio-inline'>{{ Form::radio('indicacao_interna', 1, oldRadio('indicacao_interna', 1, true)) }} Sim</label>
<label class='radio-inline'>{{ Form::radio('indicacao_interna', 0, oldRadio('indicacao_interna', 0, true)) }} Não</label>
@include('partials.validators.message_field', array('field' => 'indicacao_interna'))
</div>
</div>
</div>
And it generates this code:
<div class="form-group ">
<label for="indicacao_interna" class="col-lg-4 control-label">Indicação Interna</label> <div class="col-lg-3">
<div>
<label class="radio-inline"><input checked="checked" name="indicacao_interna" type="radio" value="1" id="indicacao_interna"> Sim</label>
<label class="radio-inline"><input name="indicacao_interna" type="radio" value="0" id="indicacao_interna"> Não</label>
</div>
</div>
As you can see, the radio button have the same id. This is wrong, right?
And... why the radio generate same id? Not just a name?
- Laravel 4.1
- Apache 2.4
- PHP 5.4.17
Sorry for my english... thanks