Tuesday, September 27, 2011

Re: Can't get the required class in form

usually required is also added if your DB field is default NOT NULL
if it is DEFAULT NULL it should have no required class


On 27 Sep., 09:28, WebbedIT <p...@webbedit.co.uk> wrote:
> You have overwritten the div with the 'div'=>'row' attribute.
>
> HTH, Paul.
>
> On Sep 26, 4:54 pm, heohni <heidi.anselstet...@consultingteam.de>
> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I have this in my model,
> > var $validate = array(
> >         'name' => array(
> >             'required' => array('rule' => 'notEmpty', 'message' =>
> > 'EmptyName', 'required' => true)
> >         ),
>
> > but I don't get the class 'required' added:
> > only:
> > <div class="row">
> > <label for="SmscallbackName">Name</label>
> > <input id="SmscallbackName" type="text" name="data[Smscallback]
> > [name]">
> > </div>
>
> > with this call
> > <?php echo $form->input('name', array('label'=>__('Ihr Name', true),
> > 'div' =>'row')); ?>
>
> > Can anyone see what I am doing wrong?

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: