Radio

A radio can also be defined, set the name, label, and value

<x-form.radio name='result' label='Won' value='Won'></x-form.radio>
<x-form.radio name='result' label='Lost' value='Lost'></x-form.radio>
<x-form.radio name='result' label='Draw' value='Draw'></x-form.radio>

Pass a value that will check the matching radio.

<x-form.radio name='result' label='Won' value='Won'>{{ $result }}</x-form.radio>
<x-form.radio name='result' label='Lost' value='Lost'>{{ $result }}</x-form.radio>
<x-form.radio name='result' label='Draw' value='Draw'>{{ $result }}</x-form.radio>

Check the checkbox by passing its value, as long its a match the checkbox will be checked.

<x-form.checkbox name='terms' value='1'>1</x-form.checkbox>

or

<x-form.checkbox name='terms' value='1'>{{ $terms }}</x-form.checkbox>

Support my work by donating with PayPal.

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2022 DC Blog. All code MIT license. All rights reserved.