{"id":245,"date":"2012-02-10T10:25:47","date_gmt":"2012-02-10T10:25:47","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=245"},"modified":"2025-09-26T15:11:38","modified_gmt":"2025-09-26T14:11:38","slug":"input-boxes","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/html\/forms-html\/input-box\/input-boxes","title":{"rendered":".Input Boxes"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>  &lt;input type=\"text\" name=\"MyInputBoxName\" disabled=\"true\" size=\"40\" style=\"border: solid 1px; background-color: #FFFFFF;\" \/&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Input box types<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;input type=\"button\"&gt;\n&lt;input type=\"checkbox\"&gt;\n&lt;input type=\"color\"&gt;\n&lt;input type=\"date\"&gt;\n&lt;input type=\"datetime-local\"&gt;\n&lt;input type=\"email\"&gt;\n&lt;input type=\"file\"&gt;\n&lt;input type=\"hidden\"&gt;\n&lt;input type=\"image\"&gt;\n&lt;input type=\"month\"&gt;\n&lt;input type=\"number\"&gt;\n&lt;input type=\"password\"&gt;\n&lt;input type=\"radio\"&gt;\n&lt;input type=\"range\"&gt;\n&lt;input type=\"reset\"&gt;\n&lt;input type=\"search\"&gt;\n&lt;input type=\"submit\"&gt;\n&lt;input type=\"tel\"&gt;\n&lt;input type=\"text\"&gt;\n&lt;input type=\"time\"&gt;\n&lt;input type=\"url\"&gt;\n&lt;input type=\"week\"&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Text<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;input type=\"text\" name=\"MyInputBoxName\" value=\"Default Name\"  \/&gt;\n\nIncluding previously submitted value:\n  &lt;input type=\"text\" name=\"MyInputBoxName\" value=\"&lt;?= $_POST&#91;\"MyInputBoxName\"];?&gt;\"  \/&gt;<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Background text<\/h5>\n\n\n\n<p>Text that vanished when you start typing into the box<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;input type=\"text\" placeholder=\"Write your name here\"  \/&gt;<\/code><\/pre>\n\n\n\n<p>Feel free to comment if you can add help to this page or point out iss<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Numeric<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Integer values<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;input type=\"number\" name=\"MyInputBoxName\" min=\"1\" max=\"5\" value=\"\" &gt;\n\nIncluding previously submitted value:\n  &lt;input type=\"number\" name=\"MyInputBoxName\" min=\"1\" max=\"5\" value=\"&lt;?= $_POST&#91;\"MyInputBoxName\"];?&gt;\" &gt;<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Allow values with decimal places<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;input type=\"number\" name=\"MyInputBoxName\" step=\".01\" value=\"\" &gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Specifying A Value <\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;input type=\"text\" value=\"1234\" \/&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Automatically Submit On Enter Key Pressed <\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;form action=\"http:\/\/www.mydomain.com\/some_file.php\" method=\"POST\"&gt;\n  &lt;input type=\"text\" name=\"Text1\" size=\"40\" style=\"width: 30px\" onkeydown=\"if (event.keyCode == 13) { this.form.submit(); return false; }\" \/&gt;\t&lt;!-- Submit form on Enter key pressed --&gt;\n&lt;\/form&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Read Only <\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;input type=\"text\" name=\"some_name\" value=\"some_value\" size=10 readonly&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Password Entry <\/h4>\n\n\n\n<p>&#8220;password&#8221;&nbsp;will cause characters to be shown as dots or stars <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;input type=\"password\" name=\"psw\"&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Max Length<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>maxlength=\"100\"<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Only allow printable ASCII (UTF8) characters<\/h4>\n\n\n\n<p>See <a href=\"https:\/\/ibex.tech\/javascript\/forms-javascript\/input-box\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Clear the content of another Input box if user types in this one<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;input type=\"text\" oninput=\"document.getElementById('SearchForRequestId').value = '';\" &gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Input box types Text Background text Text that vanished when you start typing into the box Feel free to comment if you can add help to this page or point out iss Numeric Integer values Allow values with decimal places Specifying A Value Automatically Submit On Enter Key Pressed Read Only Password Entry &#8220;password&#8221;&nbsp;will cause [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[256],"tags":[],"class_list":["post-245","post","type-post","status-publish","format-standard","hentry","category-input-box"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":23,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"predecessor-version":[{"id":5132,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/245\/revisions\/5132"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}