I use a form helper to create a label:
$this->Form->label('Contact.name', 'Name');
Which generates the following:
<label for="ContactName">Name</label>
Is it possible to create the following using the assistant:
<label for="ContactName"><span class="mandatory">*</span> Name</label>
Although I can manually write html for the above, it gets a little harder when I use an input method where a label is automatically created.
For instance:
$this->Form->input('Contact.forename',array('div' =>false, 'label' => array( text'=> 'First Name',class =>'myclass'), 'class' => 'input','size' => '25' ,'tabindex' => '1'));
Is this possible in the cake or do I need to manually enter html using javascript when the page loads? I think this is pretty ugly.
source share