html form input type text readonly





up vote 56 down vote. You can add the attribute readonly to the input: < input type"text" value"3".Good explanation can be found here: Whats the difference between disableddisabled and readonlyreadonly for HTML form input fields? HTML Input Attributes. The value attribute specifies the initial value for an input field : readonly Attribute, disabled Attribute, size Attribute etc.The autocomplete attribute works with

and the following types : text, search, url, tel, email, password, datepickers, range, and color. html5 form validation, html5 form, input type email, number, tel, range, date, time, and range. html5 Progress, meter, and details.A control with readonly attribute is not editable by user. . An HTML form with a read-only input field: and copy the text from it).Use readonly attribute: Html.TextBox Conditional attribute in ASP.NET MVC Razor. The Current State of HTML5 Forms. Wufoo.readonly is only relevant for type text, search, url, tel, email, number, password, and the date/time input types. It is also valid on