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