Welcome Guest, Not a member yet? Register   Sign In
Form Helper Label
#1

[eluser]Perkin5[/eluser]
I want to give a label the class of 'required' so I can do:

Code:
$data = array(
'class'=>'required'
);
echo form_label('First Name','',$data);

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?


Messages In This Thread
Form Helper Label - by El Forum - 02-05-2012, 03:37 PM
Form Helper Label - by El Forum - 02-05-2012, 04:02 PM
Form Helper Label - by El Forum - 02-05-2012, 04:30 PM
Form Helper Label - by El Forum - 02-05-2012, 04:35 PM
Form Helper Label - by El Forum - 02-05-2012, 04:39 PM
Form Helper Label - by El Forum - 02-05-2012, 05:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB