I did set the 'error' => false so no message shows. But how do I get the
error class to end up inside the <li>
I tried an assortment of attemps with
<li class="<?php echo $form->error('User.password', NULL, array()); ?>"> ???
But nothing.
Ideas?
Thanks,
Dave
-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of John Andersen
Sent: January-05-10 4:35 AM
To: CakePHP
Subject: Re: Error Placement / Styles
Yes you can!
In the form field, add the option 'error' => false to disable the automatic
error message. Then use the form helpers error method for the field and
place it whereever you want.
See http://book.cakephp.org/view/721/error
Enjoy,
John
On Jan 5, 9:46 am, "Dave" <make.cake.b...@gmail.com> wrote:
> Is it possible to determine where the error class gets added?
>
> for example:
>
> <fieldset>
> <ul>
> <li><?php echo $form->input('User.password', array('label' =>
> 'Password:')); ?>
> <p class="form_hint"><span class="bold red">Required:</span>
> Password must be minimum of 8 characters.</p></li>
> <li><?php echo $form->input('User.username', array('label' =>
> 'Select a Username:')); ?>
> <p class="form_hint"><span class="bold red">Required:</span>
> Username can never be changed.</p></li>
>
> </ul>
> </fieldset>
>
> So if a field fails i would like to add the error class to the <li> so
> the entire row gets the error class like <li class="error">
>
> Thanks
>
> Dave
Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com To
unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group
cake-php+at http://groups.google.com/group/cake-php?hl=en
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.725 / Virus Database: 270.14.124/2599 - Release Date: 01/04/10
04:54:00
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment