Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checkbox inside of form label tag

I'm trying to figure out how I can put the checkbox inside the label tag like my template has it with the form helper with codeigniter.

echo "<div class=\"actions-left\" style=\"margin-top: 8px;\">";
echo form_label('Auto-login in future.', 'autologin');
echo form_checkbox('autologin');
echo "</div>";

Login Page

Login Template

like image 457
Jeff Davidson Avatar asked Feb 04 '26 12:02

Jeff Davidson


1 Answers

Well I don't know CodeIgniter, but would this work:

echo form_label( form_checkbox( 'autologin' ) . ' Auto-login in future' );

like image 60
Brian Avatar answered Feb 06 '26 01:02

Brian