Jump to content

Email Form


mikalchristian

Recommended Posts

Hello, I have an email form here for patients to set appointments. It has a built in clickable calendar that displays the date you choose in a text box to be submitted with the email. It works great except when I click on the calendar it submits the form. How can I get it to only submit when the"submi" button is clicked?

Thanks

Heres the code.

 

<body><form name="contactform" method="post" action="send_form_email.php"> 
<table width="509"> 
<td width="183"></tr> 
<tr>  
<td valign="top">   
<label for="first_name">First Name *</label>  
</td>  
<td width="314" valign="top">  
<input  type="text" name="first_name" maxlength="50" size="40">  </td> </tr>   <tr>  <td valign="top"">   <label for="last_name">Last Name *</label>  </td>  <td valign="top">   <input  type="text" name="last_name" maxlength="50" size="40">  </td> </tr> <tr>  <td valign="top">   <label for="email">Email Address *</label>  </td>  <td valign="top">   <input  type="text" name="email" maxlength="80" size="40">  </td>   </tr> <tr>  <td valign="top">   <label for="telephone">Telephone Number</label>  </td>  <td valign="top">   <input  type="text" name="telephone" maxlength="30" size="40">  </td> </tr> <tr>  <td valign="top">   <label for="comments">Comments *</label>  </td>  <td valign="top">   <textarea  name="comments" cols="40" rows="6"></textarea>  </td>   </tr> <tr>  <td colspan="2" style="text-align:center">  </td> </tr> </table> 
<table width="497" border="0">
      <tr>
        <td width="184"> </td>
        <td width="303"> </td>
      </tr>
      <tr>
        <td><table width="179" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="179" height="22">1st Choice</td>
          </tr>
          <tr>
          <tr>
            <td height="5"></td>
          </tr>
            <td height="22">2nd Choice</td>
          </tr>
             <tr>
          <tr>
            <td height="5"></td>
          </tr>
          <tr>
            <td height="22">3rd Choice</td>
          </tr>
        </table></td>
        <td>
    <input size="30" id="f_date1" /><button id="f_btn1">...</button><br />
    <input size="30" id="f_date2" /><button id="f_btn2">...</button><br />
    <input size="30" id="f_date3" /><button id="f_btn3">...</button><br />
 </td>
      </tr>
    </table>
    <p> </p>
  <script type="text/javascript">//<![CDATA[

      var cal = Calendar.setup({
          onSelect: function(cal) { cal.hide() },
          showTime: true
      });
      cal.manageFields("f_btn1", "f_date1", "%Y-%m-%d %I:%M %p");
      cal.manageFields("f_btn2", "f_date2", "%b %e, %Y %I:%M %p");
      cal.manageFields("f_btn3", "f_date3", "%e %B %Y %I:%M %p");
      cal.manageFields("f_btn4", "f_date4", "%A, %e %B, %Y %I:%M %p");

    //]]></script>
    <input type="submit" value="Submit"> 

</form> 

Link to comment
https://forums.phpfreaks.com/topic/230374-email-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.