You use Texttype on a column when you need its rendered editor to use a specific HTML input type; this setting is for developers configuring how a text value is presented in an HTML page.
What Texttype controls
Texttype corresponds to the HTML type attribute of an input element. The selected value tells the browser what kind of input control it should render and what browser-level behavior may apply.
For example, an ordinary text editor is represented by:
<input type="text">
An email-oriented editor is represented by:
<input type="email">
Choose a type that matches the value
Choose an HTML input type that describes the value users enter. For example, use text for a short name and email for an email-address value when the target browser behavior is appropriate for your application.
Texttype affects the HTML input element. It does not replace the column's underlying attribute type or its model-level rules. Define the column and its data type in the model first; then use Texttype to control the corresponding HTML input type.
Related column settings
A column represents one property of a data entity and is normally equivalent to an attribute. See Documentation:Column for the column concept and its role in the generated database structure.
Do not use Texttype to render stored HTML as page markup. To place HTML from a value directly into a page, use DataIsHtml instead. For binary or large-value attribute storage, see Documentation:Attribute.Eco.BlobType.
See also
- Documentation:Column
- Documentation:Column.DataIsHtml
- Documentation:Attribute.Eco.BlobType
- Documentation:Precision
[[Category:Attributes and data types [Beginner]]
