1
   

Programming Forms in HTML

 
 
Reply Thu 7 Oct, 2004 02:51 pm
Hello. I am currently learning HTML in my CSIS class. As part of an assignment, we have to add a form to collect information about the user. I got the basic code down, thanks to a couple of websites, but I would also like to add some "advanced" features.

1.) For my form, I ask the user for his/her birthdate. I decided to use drop down boxes for the month and day. I was wondering, can I limit the selection of days to the month? Example: If the month of October is selected, the user can only choose 1 though 30 for the day instead of the full 31 days that I have programmed in the code.

2.) For the year that the person was born, I have a text box. How can I limit the value that can be entered no more than 4 digits?

3.) Right now, I have the following in the code for my form: <form action="MAILTO:[email protected]" method="post" enctype="text/plain"> With this code, upon clicking submit, Outlook Express opens with a "New Message" window. Is it possible to program it so that when submit is clicked, that it will send the information directly to my inbox without opening Outlook Express?

Also, I have one other question. When using an unordered list, I know that there are different types of bullets that can be used like circles or squares. Can gif files be used as well?

Below is the code I have thus far for my form. I replaced my e-mail address with a fake one for security purposes.
Thanks for the help.
Robert2513

<form action="MAILTO:[email protected]" method="post" enctype="text/plain">
<u>Tell me About Yourself</u>
<br>
Name:<br>
<input type="text" name="name" size="30">
<br>

E-Mail Address:<br>
<input type="text" name="mail" size"30">
<br>

Birthdate:<br>
<select name="birthmonth">
<option value="January">January
<option value="February">February
<option value="March">March
<option value="April">April
<option value="May">May
<option value="June">June
<option value="July">July
<option value="August">August
<option value="September">September
<option value="October">October
<option value="November">November
<option value="December">December
</select>

<select name="birthday">
<option value="1">1
<option value="2">2
<option value="3">3
<option value="4">4
<option value="5">5
<option value="6">6
<option value="7">7
<option value="8">8
<option value="9">9
<option value="10">10
<option value="11">11
<option value="12">12
<option value="13">13
<option value="14">14
<option value="15">15
<option value="16">16
<option value="17">17
<option value="18">18
<option value="19">19
<option value="20">20
<option value="21">21
<option value="22">22
<option value="23">23
<option value="24">24
<option value="25">25
<option value="26">26
<option value="27">27
<option value="28">28
<option value="29">29
<option value="30">30
<option value="31">31
</select>

<input type="text" name="Year" size="20">
<br>

Major:<br>
<input type="text" name"major" size="20">
<br>

<br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 1,310 • Replies: 1
No top replies

 
Craven de Kere
 
  1  
Reply Thu 7 Oct, 2004 06:30 pm
Re: Programming Forms in HTML
Robert2513 wrote:
1.) For my form, I ask the user for his/her birthdate. I decided to use drop down boxes for the month and day. I was wondering, can I limit the selection of days to the month? Example: If the month of October is selected, the user can only choose 1 though 30 for the day instead of the full 31 days that I have programmed in the code.


You would have to use scripting (either client-side or server side) for this, as it would require dynamic forms.

Plain HTML will not do this.

Quote:
2.) For the year that the person was born, I have a text box. How can I limit the value that can be entered no more than 4 digits?


Add maxlength=4 to the form field.

Quote:
3.) Right now, I have the following in the code for my form: <form action="MAILTO:[email protected]" method="post" enctype="text/plain"> With this code, upon clicking submit, Outlook Express opens with a "New Message" window. Is it possible to program it so that when submit is clicked, that it will send the information directly to my inbox without opening Outlook Express?


Not with html. You would need server side scripting to accept the data and send the email.

Quote:
Also, I have one other question. When using an unordered list, I know that there are different types of bullets that can be used like circles or squares. Can gif files be used as well?


Yes, I usually do this using CSS. Here is an example CSS code:

Code:.bullet {list-style-image: url(/images/bullet.gif);}
0 Replies
 
 

Related Topics

In How much time a website can be developed? - Question by aussiejumpingcastle
Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Programming Forms in HTML
Copyright © 2019 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 10/20/2019 at 10:42:29