0

I don't understand what I'm doing wrong here: http://adam-sites-for-clients.info/set-up/

I'm using this: http://docs.jquery.com/Plugins/Validation

and my code is:

<script type="text/javascript">
$("#myForm").validate();
</script>

Ideas???

3
  • 1
    Did you setup validation options ? Commented Jul 12, 2012 at 12:10
  • You need to tell the plug how and what to validate. Check out the tab "view source" at docs.jquery.com/Plugins/Validation#Example Commented Jul 12, 2012 at 12:10
  • What do you mean by validation options? the documentation says it has a default built in Commented Jul 12, 2012 at 12:12

1 Answer 1

1

Remove your form and paste this in:

<form class="optin" method="post" action="submit.php" id="myForm">
  <label for="name" class="label"><img src="images/label1.png" alt="" /></label>
  <input type="text" name="name" class="textbox required" id="name" />
  <label for="phone" class="label move"><img src="images/label2.png" alt="" /></label>
  <input type="text" name="phone" class="textbox required" id="phone" />
  <label for="email" class="label move"><img src="images/label3.png" alt="" /></label>
  <input type="text" name="email" class="textbox required email" id="email" />
  <input type="submit" class="submit" name="submit" value="" />
  <input id="topic" type="hidden" name="topic" value="homepage">
</form>

...then read the documentation, then go from there.

Notice the classes I added to the <input> elements?

Sign up to request clarification or add additional context in comments.

1 Comment

thanks bro! I actually read the documentation. Guess I missed that :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.