How to bring the radio button checked with a Bank result

0

It looks like a simple thing but it's not working, I'm trying to get a radio button checked but it does not bring anything marked, the data is being returned from the bank, I've already done the test but the radio is not marked.

In my Blade view I'm bringing this:

<label><input type="radio" name="colaborativa" value="1" {{isset($escola->colaborativa) == 1 ? 'checked' : '' }} required>Sim</label>

<label><input type="radio" name="colaborativa" value="0" {{isset($escola->colaborativa) == 0 ? 'checked' : '' }} required>Não</label>
    
asked by anonymous 04.10.2016 / 06:11

1 answer

0

You have the correct PHP error:

<label><input type="radio" name="colaborativa" value="1" {{isset($escola->colaborativa) && $escola->colaborativa == 1 ? 'checked' : '' }} required>Sim</label>

<label><input type="radio" name="colaborativa" value="0" {{isset($escola->colaborativa) && $escola->colaborativa == 0 ? 'checked' : '' }} required>Não</label>
    
04.10.2016 / 06:27