Forum Moderators: coopster

Message Too Old, No Replies

Adding a calendar to a contact form

         

Jamier101

9:23 pm on Mar 18, 2011 (gmt 0)

10+ Year Member



I've created a contact form for a clients website and a part of the form requires the user to enter a date, I was thinking that instead of typing the date in they could click an icon and have a little calendar appear to allow them to select a date... does anyone know if this is possible?

Jamier101

10:21 pm on Mar 18, 2011 (gmt 0)

10+ Year Member



I currently have:

<form method="POST" action="sendmail.php">
Name:<br />
<input type="text" name="Name"><br />
Tel:<br />
<input type="text" name="Tel"><br />
E-mail:<br />
<input type="text" name="email"><br />
WeddingDate:<br />
<input type="text" name="date"><br />
Comment:<br />
<textarea name="Comment" cols="50" rows="8"></textarea><br />
<input type="submit" name="submit" value="Submit">
</form>

coopster

2:45 pm on Mar 19, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yes, you can do this using JavaScript. You could either write your own or use an existing JavaScript library such as jQuery and the jQuery UI. A demo can be seen here on the jQueryUI Datepicker [jqueryui.com] widget.