title: validation not working in email template
body: <p>I have used JavaScript to validate form using id #mycontactform but it is not working.
  then i used required but it also not working. I spent more time behind this but still not get success.</p>
  
  <p>Here is the JavaScript i tried.</p>
  
  <pre><code>$(document).ready(function() {
    //$('#mycontactform').submit()
      $('#mycontactform').submit(function() {
          $.post('send.php', $('#mycontactform').serialize(),  function(response) {
              $('#success').html(response);
            //$('#success').hide('slow');
              setTimeout(function() {
                  alert('Information Send Successfully');
              }, 1000);
              $('#submit').css('background','green');
          });
          return false;
      });
  });
  </code></pre>
  
  <p>Here is HTML:</p>
  
  <pre><code>&lt;form id='mycontactform' action='send.php' method='post'&gt;
      &lt;select id='time' name='time' style='text-align:center;' required&gt;
          &lt;option value=''&gt;&amp;nbsp;&amp;nbsp;-- select --&amp;nbsp;&lt;/option&gt;
          &lt;option value='this week'&gt;this week&lt;/option&gt;
          &lt;option value='next week'&gt;next week&lt;/option&gt;
          &lt;option value='no rush'&gt;no rush&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;select id='people' name='people' style='text-align:center;' required&gt;
          &lt;option value=''&gt;&amp;nbsp;&amp;nbsp;-- select --&amp;nbsp;&lt;/option&gt;
          &lt;option value='1'&gt;1&lt;/option&gt;
          &lt;option value='2'&gt;2&lt;/option&gt;
          &lt;option value='3'&gt;3&lt;/option&gt;
          &lt;option value='4'&gt;4&lt;/option&gt;
          &lt;option value='5'&gt;5&lt;/option&gt;
      &lt;/select&gt;
  
      &lt;label for='radio3'&gt;Yes&lt;/label&gt;
      &lt;input type='radio' id='radio3' name='obstacles' value='yes' checked&gt;
  
      &lt;label for='radio4'&gt;No&lt;/label&gt;
      &lt;input type='radio' id='radio4' name='obstacles' value='no'&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is PHP:</p>
  
  <pre><code>&lt;?php
  $obstacles = $_POST['obstacles'];
  $people = $_POST['people'];
  $tim = $_POST['time'];
  $to = 'mymail@gmail.com';
  $from = $email;
  $subject = 'Domestic &amp; Commercial Gutter cleaning Replies From Email';
  $body = "Obstacles : &lt;strong&gt;$obstacles&lt;/strong&gt;&lt;br&gt;
  People Required : &lt;strong&gt;$people&lt;/strong&gt;&lt;br&gt;
  Time required : &lt;strong&gt;$tim&lt;/strong&gt;&lt;br&gt;
  ";
  $headers  = 'MIME-Version: 1.0' . "\r\n";
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  $headers .= "From: $from";
  $ok = mail($to, $subject, $body, $headers);
  if($ok)
  echo '1';
  else
  echo '0';
  ?&gt;
  </code></pre>
  
  <p>Please suggest me helpful solution. All possible ways like using Ajax, make JavaScript working, or any other way.</p>