1 Reply Latest reply on Feb 11, 2010 4:21 AM by Mylenium

    Help with form validation - terms and conditions checkbox

    johngordon12 Level 1

      Hopefully someone can help with this quite easily...

       

      Basically, I've been trying to add in a checkbox for people to confirm they've read some terms and conditions. Typical sort of thing you see a lot.

       

      I've found the JS script that does it...

       

      <script type="text/javascript">

      function validate(form) {

       

      if (!document.form1.terms.checked) { alert("Please check the terms and conditions");

      return false; }

       

      }

      </script>

       

      ...but have an issue in that the form won't submit after its been changed.

       

      ie, if you fill in the form, omitting to check the box at the bottom of the form, you get the error message OK.

       

      But then, when you go back and check it, nothing seems to happen when you then try to submit the form again.

       

      Any ideas how to fix that?

       

      The page is here :

       

      http://www.ccmvaleting.co.uk/contactnew.php

       

      Many thanks again.