Form Helper adding class to the text box |
[eluser]R_Nelson[/eluser]
with the form helper is there a way to send a class into form_text() or can someone show me how to extend the helper to allow it? when i do a view source i would like to see this Code: <input type="text" id="username" name="username" class="inn"/>
[eluser]Madmartigan1[/eluser]
There is no function form_text() Just do this: form_input('my_name', 'my_value', 'class="inn"'); You can also pass an associative array to the first param. Maybe the third too/instead, not sure. It's clearly documented in the user guide. You should have received a copy with your CI download. If not, it's online here: http://ellislab.com/codeigniter/user-guide/
[eluser]R_Nelson[/eluser]
my bad was in a hurry when i wrote it lol i must have missed it in the guide!
[eluser]InsiteFX[/eluser]
R_Nelson, You can create a MY_form_helper and make all the changes you need in it! InsiteFX
[eluser]R_Nelson[/eluser]
thanks for all the help i ended up using a helper file of my own and it works great! |
Welcome Guest, Not a member yet? Register Sign In |