Hi, I have a form started like this:
<?php echo $this->Form->create('Transaction',array(
'url'=>array('controller'=>'transactions','action'=>'data')
,'inputDefaults'=>array(
'label'=>array(
'class'=>'bd-label'
),'div'=>array(
'class'=>'bd-div'
),'class'=>'bd-input'
)
)); ?>
Each label, div and input is given a custom class. However i want to
change the label of one of the inputs. I have tried two options:
echo $this->Form->input('name',array('label'=>'not really a name'));
and
echo $this->Form->input('name',array('label'=>array('text'=>'not
really a name')));
Each of these however results in a a label without the bd-label class.
Doing this will obviously solve the problem:
echo $this->Form->input('name',array('label'=>array('text'=>'not
really a name','class'=>'bd-label')));
but perhaps there is a cleaner solution? I have a lot of inputs with
custom labels in this form. Thanks.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php