Hey all, how can I use the placeholder tag in CodeIgniter's form_input()
helper function?
Thanks :)
Do you mean the placeholder attribute (not tag)? form_input()
takes a third parameter with additional attributes.
$opts = 'placeholder="Username"';
form_input('username', '', $opts);
Or you can pass form_input()
an array.
form_input(array(
'name' => 'username',
'value' => '',
'placeholder' => 'Username',
));
CodeIgniter Form Helper
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With