Ah, of course. I just realised, also, that I can add a CSS rule to
remove the style inside the edit form.

On Mon, Apr 7, 2008 at 6:14 PM, Dardo Sordi Bogado <[EMAIL PROTECTED]> wrote:
>
>  $this->Business->validate = array();
>
>
>
>  On Mon, Apr 7, 2008 at 3:22 PM, b logica <[EMAIL PROTECTED]> wrote:
>  >
>  >  Does anyone know how to keep FormHelper from adding a "required" class
>  >  to a form element? I have a model, Business, for which the "name"
>  >  field is required to validate. On a search form I have the class is
>  >  being added, causing the CSS style for "required" to be applied.
>  >  However, the name field is not required for a search.
>  >
>  >  FormHelper::input() doesn't appear to offer any way around it:
>  >
>  >  if (in_array($this->field(), $this->fieldset['validates'])) {
>  >     $divOptions = $this->addClass($divOptions, 'required');
>  >  }
>  >
>  >  >
>  >
>
>  >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to