Input Text
The Input Text element is probably the most commonly-used of the group and allows users to type in characters. It looks like this in use:
Using It
The Input Text element attributes include:
Attribute | Description |
---|---|
ID | (Required) The element ID, unique within the definition. |
Caption | Specifies text that will be displayed to the left of the text input box. |
Caption Class | Specifies one or more style sheet classes that will be applied to the element's Caption, if a different class than that applied to the Input element as whole is desired. |
Change Flag Element ID | Specifies the ID of an Input Hidden element that will be used as a "change flag". |
Class | Specifies one or more style sheet classes to be applied to the entire Input element. |
Default Value | Specifies the default value that will appear in the text box. Can be used with tokens to display values from data, or passed from another report or a process. Overrides the Save In Local Storage attribute, sodo not use them at the same time. |
Format | Specifies a format for the Default Value text displayed. This does not act as a mask (i.e. it does not force entry of characters in a specific pattern) nor does it change the visible data after entry. More information can be found in Format Data. |
Input Maximum Length | Specifies the maximum number of characters than can be entered into the input box. If this is greater than the Input Size value, text will automatically scroll horizontally in the box. |
Input Size | Specifies the physical width of the input box, in characters, on the screen. |
Placeholder | Specifies the text of a short hint or caption, often used to describe the expected value, that appears within the input box when it's empty. The text is displayed in a gray color and you may care to use it instead of a Caption. The text disappears when data is entered and reappears if the entered data is deleted. |
Save In Cookie | When True, stores the data entered by the user in a cookie, named after the element ID. The cookie can then be used to set the element's default value, so that previously entered data is retrieved, by setting the Default Value attribute to @Cookie.myInputId~. |
Save In Local Storage | When True, stores the data entered by the user in the browser's "local storage" (if the browser supports this HTML5 technology). Data stored this way is retained between sessions and automatically restored as the Input element's default value when the page is redisplayed. The local storage size limit is approximately 5 MB and all values are stored as strings. Save In Local Storage is overridden by the Default Value attribute. Do not use them at the same time. |
Security Right ID | Controls access to this element when using Logi Security. Provide the ID of a Right defined in the application's _Settings definition and only users that have a Role referenced in the Right will be able to view the element. Multiple Right IDs, separated by commas, may be entered. |
Tooltip | Specifies text that appears when the user hovers the pointer over the input box. Tokens may be used here. |
The Input Text element can be used with the AutoComplete element (see Working with User Input Elements), to assist users in entering text based on data. This element can be used by itself or within an Input Grid element to make alignment with other Input elements easier.
Getting Its Data
The text entered into this element will be available in the next Report or Process task by using an @Request token. For example, if the element's ID is set to txtFirstName, then its data will be available as the token @Request.txtFirstName~.
Input Text Delimiter Child Element
The Input Text Delimiter child element is available to be added beneath an Input Text element to control special characters in the input data and its attributes are:
Attribute | Description |
---|---|
Class | Specifies an optional class to be applied to each delimited value within the Input Text control. For example, if using a Logi theme, the ThemeLinkButton class can be specified here to cause the values to appear as "pills". |
Delimiter | Specifies the single character to be used to delimit multiple values entered into the Input Text control. Default value: comma. |
Escape Character | Specifies the single character to be used as an escape character in the values entered in the input value. It will be ignored if no Qualifier attribute value is specified, but is required if a Qualifer value is specified. The Escape Character will be used to "escape" any instances of the Qualifier found within the input value. For example, if the Escape Character is a backslash and the Qualifier character is a double-quote and the input string is: Lewis "Chesty" Puller When the page is submitted, the resulting string value will have the Escape Character inserted and become: Lewis \"Chesty\" Puller |
Qualifier | Specifies the single character that will enclose complete data values, allowing the Delimiter character to be included in the data without being processed as a delimiter. Leave this value blank only if there is no chance that the Delimiter character can be used in the data. For example, consider an addresses that includes a city and state, separated by a comma: if the Delimiter is a comma, the city and state will be processed as twovalues when the page is submitted: McLean, Virginia = values: McLean,Virginia However, if the Delimiter is not a comma and the Qualifier is a double-quote, only one value will be processed: McLean, Virginia = value: "McLean,Virginia" |
When an Input Text element has both Input Text Delimiter and Auto Complete child elements, the Auto Complete element's Multiple Selections attribute is ignored and assumed True, and the Delimiter specified in the Input Text Delimiter element will be used (although the delimiter will not be visible).
More Information
For additional information, see the Element Reference entry for Input Text.