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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.