Text Form Fields for collecting user text entries


Use the Text Form Field for entering text and collecting data on your webpages

Learn to make a website people

The Text Input Form input type="text"

Here we will show you how to retrieve text strings from your web page visitors with the HTML form field text box.

The text form element is a one lined box which is used for collecting strings of text from web page visitors. By putting this form on your website it enables your visitors to input text into a text box and submitting it to your email or another page

Using Attributes in the table below you can format the size and look of the text input

Attribute Description
name Name of variable submitted with form
size Amount of Characters shown
maxlength Maximum Characters allowed to be entered
value Text or value in box when first displayed and variable contained in "name"

Example without submit button

<form action="formOutput.php" method="post">
<input type="text" name="exampleform" size="25" maxlength="25" value="Type text and press Enter!" />
</form>

Example with submit and reset button

<form action="formOutput.php" method="post">
<input type="text" name="exampleform" size="25" maxlength="25" value="Type text and press Submit!" />
<input type="submit" value="Submit" />
<input type="reset" />
</form>

The Text Input Form type="password"

Its also possible to hide the characters typed into a text form for password strings.

Example password texts with submit and reset button

<form action="formOutput.php" method="post">
<input type="password" name="exampleform" size="25" maxlength="25" value="" />
<input type="submit" value="Submit" />
<input type="reset" />
</form>

Site designed by Pro-WebDesign