<input type="text" name="MyInputBoxName" disabled="true" size="40" style="border: solid 1px; background-color: #FFFFFF;" />
Input box types
<input type="button">
<input type="checkbox">
<input type="color">
<input type="date">
<input type="datetime-local">
<input type="email">
<input type="file">
<input type="hidden">
<input type="image">
<input type="month">
<input type="number">
<input type="password">
<input type="radio">
<input type="range">
<input type="reset">
<input type="search">
<input type="submit">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">
Text
<input type="text" name="MyInputBoxName" value="Default Name" />
Including previously submitted value:
<input type="text" name="MyInputBoxName" value="<?= $_POST["MyInputBoxName"];?>" />
Background text
Text that vanished when you start typing into the box
<input type="text" placeholder="Write your name here" />
Feel free to comment if you can add help to this page or point out iss
Numeric
Integer values
<input type="number" name="MyInputBoxName" min="1" max="5" value="" >
Including previously submitted value:
<input type="number" name="MyInputBoxName" min="1" max="5" value="<?= $_POST["MyInputBoxName"];?>" >
Allow values with decimal places
<input type="number" name="MyInputBoxName" step=".01" value="" >
Specifying A Value
<input type="text" value="1234" />
Automatically Submit On Enter Key Pressed
<form action="http://www.mydomain.com/some_file.php" method="POST">
<input type="text" name="Text1" size="40" style="width: 30px" onkeydown="if (event.keyCode == 13) { this.form.submit(); return false; }" /> <!-- Submit form on Enter key pressed -->
</form>
Read Only
<input type="text" name="some_name" value="some_value" size=10 readonly>
Password Entry
“password” will cause characters to be shown as dots or stars
<input type="password" name="psw">
Max Length
maxlength="100"
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.