How to bring the radio button checked with a Bank result

Asked

Viewed 1,034 times

0

It seems such a simple thing but it’s not working I’m trying to bring checked a radio button but it does not bring anything marked the data is being returned from the bank already made the test but the radio does not come marked.

On my view of Blade I’m bringing it like 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>

1 answer

0


Have PHP error, correct:

<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>
  • 1

    Thanks Virgilio was that same I didn’t even notice that tramping at dawn gives in that Rsrsrsrsrsrsrs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.