is there a way to do this through the Model or Controller instead of
through the View?
ie. with the "validates" property of the Model?

it seems very unmaintainable and unwieldy to have to set the class for
every form field in every view...




On Jan 23, 5:32 pm, francky06l <[EMAIL PROTECTED]> wrote:
> you can set theclassof the div :
>
> $form->input('Creditcard.xxxx', array('div' => array('class' =>
> 'required')));
>
> hth
>
> On Jan 23, 7:28 pm, Greg Baker <[EMAIL PROTECTED]> wrote:
>
> > I have two models: Application & CreditCard...
> > The application requires a user to input their credit card
> > information, so instead of having a credit_cards_controller and
> > related views, I just use the application add view.
>
> > My problem is that the credit card information isrequired, but since
> > I'm using $form->input('CreditCard.xxxx') in my view it doesn't add
> > the 'required'classto the input div.
>
> > Is there a way to get $form->input() to check whether or not the
> > credit card fields arerequired?
> > Greg

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