Note that there are some explanatory texts on larger screens.

plurals
  1. POAnother Jquery form validation issue
    text
    copied!<p>I am trying to implement a form validation using jquery, but so far am not able to get it working. I have been reading several of the other questions, but none seem to help me on my way. I am using the Jquery validation plugin <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" rel="nofollow">http://bassistance.de/jquery-plugins/jquery-plugin-validation/</a> To my understanding the basic idea is to give your form an ID, and add class="required" to the specific input fields, but so far nothing has been happening, and it happily posts my form.</p> <p>my script is:</p> <pre><code>&lt;script&gt; $(document).ready(function(){ $("#validate").validate(); }); &lt;/script&gt; </code></pre> <p>the form looks like this:</p> <pre><code>&lt;form action="" id="validate" method="post"&gt; &lt;?do { ++$i; ?&gt; &lt;button type="button" class="togbut" href="#&lt;?echo $i;?&gt;"&gt;Lijst voor &lt;?echo $_SESSION['leerlingen'][$i];?&gt; invullen&lt;/button&gt; &lt;br&gt; &lt;div id="&lt;?echo $i;?&gt;" style="display:none"&gt; &lt;? echo $_SESSION['leerlingen'][$i]; ?&gt; &lt;fieldset&gt; &lt;input type='hidden' name='ingevuld' id='ingevuld' value='1'/&gt; &lt;legend&gt;A. Leerprestaties:&lt;/legend&gt; &lt;label&gt;de prestaties blijven achter bij de capaciteiten&lt;/label&gt; &lt;div&gt;&lt;input type="radio" class="required" name="pr_ach_lp13&lt;?echo ++$counter;?&gt;" value="1"&gt;&lt;/div&gt; &lt;div&gt;&lt;input type="radio" class="required" name="pr_ach_lp13&lt;?echo $counter;?&gt;" value="2"&gt;&lt;/div&gt; &lt;div&gt;&lt;input type="radio" class="required" name="pr_ach_lp13&lt;?echo $counter;?&gt;" value="3"&gt;&lt;/div&gt; &lt;div&gt;&lt;input type="radio" class="required" name="pr_ach_lp13&lt;?echo $counter;?&gt;" value="4"&gt;&lt;/div&gt; &lt;div&gt;&lt;input type="radio" class="required" name="pr_ach_lp13&lt;?echo $counter;?&gt;" value="5"&gt;&lt;/div&gt; &lt;/fieldset&gt; &lt;/div&gt; &lt;? } while($i&lt;$_SESSION['num_rows']);?&gt; &lt;input id="submit" type="submit" value="opslaan"&gt; &lt;/form&gt; </code></pre> <p>could somebody please tell me what I am doing wrong?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload