artisticre
3 days ago

Radio Button Not formatting correctly

Posted 3 days ago by artisticre

I have a radio button below, its inputting 1 for yes and 0 for no and trying to format it with {{$sp->bothspouseattend ? 'Yes' : 'No'}}

but it always displays no no matter what the database returns. What am I doing wrong?

<div class="pretty p-icon p-round mt-4">
        <input type="radio" name="bothspouseattend" value="1" />
        <div class="state p-primary">
            <i class="icon mdi mdi-check"></i>
            <label class="font-weight-bold text-primary">Yes</label>
        </div>
    </div>

    <div class="pretty p-icon p-round">
        <input type="radio" name="bothspouseattend" value="0" />
        <div class="state p-warning">
            <i class="icon mdi mdi-check"></i>
            <label class="font-weight-bold text-primary">No</label>
        </div>
    </div>

Please sign in or create an account to participate in this conversation.