Support the ongoing development of Laravel.io →
posted 10 years ago
Forms
Last updated 2 years ago.
0

how do you store the values on the database?

this is a laravel example: http://laravel.com/docs/html#checkboxes-and-radio-buttons

you can also do it the old way

<input type="checkbox" name="like" value="1" <?php if($user->like==1) { echo 'checked'; } ?> />
Last updated 2 years ago.
0

If you are using Bootstrap or Foundation framework I highly suggest this package to make things like checkboxes a whole lot easier: https://github.com/Anahkiasen/former

Last updated 2 years ago.
0

Thank you, extjac! That worked perfectly. I can't believe I missed that in the documentation... but it helps for me to have the old way as well.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Failcookie failcookie Joined 20 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.