Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery validate plugin and WordPress footer.php file
    primarykey
    data
    text
    <p>hopefully someone can shed some light on this for me...</p> <p>I'm making a WP theme with two forms in the footer.php file. These need to be validated with AJAX, and I'm using <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" rel="nofollow">this plugin</a></p> <p>When building the HTML template the forms worked fine, they are checked and then the results are fired off in an email to the user. However, not the theme is taking shape the forms only work on the home page, and no other pages. I cannot understand why! The jS is in the header.php file, and the forms in the footer.php file - so basically the same code runs on every page. I'm also running some other basic jQuery script, a google map and a coinslider plugin. I have taken all these other bits of jS out to try and find the problem, and nothing has worked so far. I am using 1.6.1. </p> <p>This is the jQuery for the forms;</p> <pre><code>$('#commentForm').validate(); $('#commentFormTwo').validate(); </code></pre> <p>and this is one of the forms (the other form just has a different id) ;</p> <pre><code> &lt;form class="cmxform" id="commentForm" method="post" action=""&gt; &lt;label for="cname" class="label"&gt;Name&lt;/label&gt; &lt;input id="cname" name="fs_name" class="required text" minlength="2" /&gt;&lt;div class="clear"&gt;&lt;/div&gt; &lt;label for="cemail" class="label"&gt;Email&lt;/label&gt; &lt;input id="cemail" name="fs_email" class="required email text" /&gt;&lt;div class="clear"&gt;&lt;/div&gt; &lt;label for="cphone" class="label"&gt;Phone&lt;/label&gt; &lt;input id="cphone" name="fs_phone" class="required text" minlength="6" /&gt;&lt;div class="clear"&gt;&lt;/div&gt; &lt;label for="ccomment" class="label"&gt;Enquiry&lt;/label&gt; &lt;textarea id="ccomment" name="fs_comment" class="required text"&gt;&lt;/textarea&gt;&lt;div class="clear"&gt;&lt;/div&gt; &lt;input type="hidden" value="sent" name="footer_sales" /&gt; &lt;input class="submit" type="submit" value="Submit"/&gt; &lt;/form&gt; </code></pre> <p>Hopefully this is enough info to give you the idea. </p> <p>Can anyone kindly offer an advice? My head hurts : \</p> <p>Thanks, Dan.</p> <p>Edit: here is the home page: <a href="http://tinyurl.com/3lepjqv" rel="nofollow">http://tinyurl.com/3lepjqv</a> - if you check the about us page you will see the validate does not work. Please ignore any messy coding, this is far from complete!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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