Hi, my name is David Carr and I'm a PHP Developer.

Blog Archives Categories Authors About Me Open Source Books Contact Me

Sponsor Me

Help support the blog so that I can continue creating new content!

My Latest Book

Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more


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>


<x-form.checkbox name='terms' value='1'>{{ $terms }}</x-form.checkbox>
Copyright © 2009 - 2022 David Carr. All code MIT license. All rights reserved.