First Thank You Joel For answering,
i am using required1 because i have renamed the class since there is a
similar class in generic.css of cakephp.
as for the formCallback() i have copied paste it from the demo they
are using on the website.
Should i include  in the form onsubmit"return something something" or
it acts upon events .


On Apr 4, 9:26 am, Joel <[EMAIL PROTECTED]> wrote:
> 1) You should include the prototype/scriptaculous libraries _before_
> any additional scripts that require these libraries.
> 2)I believe the class is "required" and not "required1".
> 3)Also, what is in the formCallback() javascript method?
>
> -Joel.
>
> On Apr 4, 1:20 am, meAgain <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
>
> > I need help in running prototype in using the validation found on 
> > :http://tetlaw.id.au/view/javascript/really-easy-field-validation
>
> > i have included in my layout  all the files I need :
> > <?php echo $javascript->link('validation/scriptaculous/
> > validation.js'); ?>
> > <?php echo $javascript->link('validation/scriptaculous/
> > fabtabulous.js'); ?>
> > <?php echo $javascript->link('validation/scriptaculous/lib/
> > prototype.js'); ?>
> > <?php echo $html->css('validation/style'); ?>
>
> > and in the form
> > i have put
> > <script type="text/javascript">
> >          var valid = new Validation('test', {immediate : true,
> > onFormValidate : formCallback});
> > </script>
> > <form action="<?php echo $html->url("/notes/add"); ?>"  name="test"
> > id="test" method="post" >
>
> >  <div class="form-row">
> >       <div class="field-label">Title:  </div>
> >       <div class="field-widget"><?php echo $html->input('Note/
> > title',array('class'=>'required1','size'=>'40','title'=>'Enter your
> > name'));?>
> >   </div>
>
> >   <div class="form-row">
> >       Body:
> >       <?php echo $html->textarea('Note/body') ?>
> >    </div>
> >       <div class="form-row">
>
> >       <?php echo $html->submit('Save') ?>
> >     </div>
> > </form>
>
> > But unfortunately it is not running. When i run it i keep getting an
> > error and if whenever i check the view page source i get :
> > <div class="field-widget"><input name="data[Note][title]"
> > class="required1 form_error" size="40" title="Enter your name"
> > value="" type="text" id="NoteTitle" />   </div>
>
> >   <div class="form-row">
> >       Body:
> >       <textarea name="data[Note][body]"  id="NoteBody"
> > class="form_error"></textarea>    </div>
>
> > what am i missing and why am  i getting the class="required1
> > for_error"
>
Thank you in advance

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