echo $form->error(...)
only returns something if there's an error....No need to wrap in a
condition.
On Feb 7, 2008 12:23 PM, <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am looking for means to detect if any errors exist in a form and
> then wrap my errors in a div. The deprecated
> HtmlHelper::validateErrors would work by returning an error count but
> according to API doc form->errors should now be used. The problem is
> that this method appears not to currently exist. Can anyone suggest a
> clean way of doing this ?
>
> i.e
>
> if(form has errors) {
> if($form->isFieldError(...)
> echo $form->error(...)
> ..
> }
>
> Thanks,
>
> Tom
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---