Site Tools


webseite:html:form

Table of Contents

This is an old revision of the document!


Form

Basics

Code Function
<form action="File.php" method="post"></form> opens a form and closes it
<input type="text" name="text" size="20"> displays a textfield
<select name="status">
<option selected value=""></option>
<option value="text1">text1</option>
<option value="text2">text2</option>
<option value="text3">text3</option>
</select>
displays a dropdown
<input required type=“password” size=“20” name=“passwort”> hides the input text
<input type=“radio” name=“radiobutton” value=“selectme”> radio buttons
<input type=“checkbox” name=“chkbox” value=“selectme”> checkbox
<input type=“submit” value=“Buttontext”> submitbutton to send the input to a phpfile

Code example

<form action="form.php" method="post">
 
Status:<br/>
 
<select name="status">
  <option selected value=""></option>
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>
</select><br/><br/>
 
  Date(YYYY-MM-DD): <br/><input type="text" name="date" size="20"></br></br>
 
  Time(HH:MM:SS): <br/><input type="text" name="time" size="20"></br></br>
 
  Place: <br/><input type="text" name="place" size="20"></br></br>
 
  Text: <br/><input type="text" name="text" size="20"></br></br>
 
  <input type="submit" value="send"><br/><br/>
</form>

See form for the PHP



webseite/html/form.1434375801.txt.gz · Last modified: 2017/03/01 12:50 (external edit)