Form Helper Label |
[eluser]Perkin5[/eluser]
I want to give a label the class of 'required' so I can do: Code: $data = array( but for a single attribute, it doesn't seem worth using an array. So I tried: Code: echo form_label('First Name','','class="required"'); but it doesn't work. A simlar approach works with other form helper elements so why doesn't this work? Or how can it be made to work?
[eluser]CroNiX[/eluser]
Extend the form_helper with your own form_label() function. Looking at the code, it seems pretty easy to do what you are wanting there.
[eluser]CroNiX[/eluser]
Read the Extending Helpers section. It's pretty easy (as is extending just about everything in CI).
[eluser]InsiteFX[/eluser]
Just p[ass it the css class name in $str Saveas: ./application/helpers/MY_form_helper.php Code: // ------------------------------------------------------------------------ |
Welcome Guest, Not a member yet? Register Sign In |