Text fields and text areas are form controls that users can type responses into in the web browser.
Use a text field widget when prototyping a form field for which a short (single-line) response is expected, such as a username or password field. (These are also good for search fields.)
Use the text area widget when prototyping a form field for which a long (multi-line) response is expected, such as a feedback form.
Note: Text areas are just multi-line text fields, and they behave the same as text fields in the web browser (except with respect to input types, which are exclusive to text fields).
You can add hint text to a text field/area using the Hint Text field in the More Properties menu at the top-right of the Interactions pane. Hint text will appear in a text field/area until the user interacts with it, at which time it will disappear to allow the user to fill in the input as needed.
Hint text is grey by default and appears in the font applied to the text field/area. To change the hint text's styling, select the :hint style effect at the top of the Interactions pane.
You can choose whether the hint text will be hidden after the text field/area has been focused or after the user starts typing. Use the Hide After dropdown in the More Properties menu to make your selection.
Input Types (Text Fields Only)
You can give text field widgets different input types to denote their function in a user input form. Use the Type dropdown in the More Properties menu in the Interactions pane to select the input type for a text field.
Keep in mind that web browsers often apply their own styling to certain types of text fields. In addition, when you select a text field on a mobile device, some field types will cause a different type of keyboard to appear, such as a number keypad instead of the alphanumeric keyboard.
Note: Text field types are a feature of HTML, not an invention of Axure's — we're just giving you access to them. As such, you'll find that certain field types are more applicable to working in Axure RP than others.
The different types of fields and the results of using that field type are as follows:
Text: Default setting used for basic text entry
Password: Text is masked as it is entered
Email: May prompt an email keyboard on mobile devices
Number: Only accepts numeric input, may prompt a numeric keyboard on mobile devices
Phone Number: May prompt a dial pad on mobile devices
URL: May prompt a URL-entry keyboard on mobile devices
Search: May add a search button to keyboard on mobile devices. Some web browsers may add an "X" icon you can click to clear the field
File: Changes the text field into a file-upload button in the web browser, which will open the device’s file browser when clicked (though it is not possible to upload a file to an Axure RP prototype)
Date: May prompt a browser-styled date picker or calendar control
Month: May prompt a browser-styled month and year picker
Time: May prompt a browser-styled time picker
Tab order for text fields, text areas, and other form widgets is determined by their layer depth, as shown in the Outline pane. You can learn more about this and how to change a widget's tab order in the Organizing Widgets article.
Maximum Length (Text Fields Only)
You can use the Max Length field in the More Properties menu in the Interactions pane to specify the maximum length of entry a text field will accept. The field will stop accepting additional text input once the maximum character length has been reached.
When you set a text field/area to "read only," the text already on the widget can be seen and selected in the web browser, but it can't be changed by the user. To set a text field/area to read only, check the Read Only checkbox in the More Properties menu in the Interactions pane.
Capturing and Evaluating the Entered Text
You can access the text entered in a text field or text area via the text on widget value option in actions and conditions. For example, you can set the value of a global variable to the text on a text field/area in order to carry that text over to a different page. You can also evaluate a text field or text area's text in a condition to only execute a certain case if the text matches a particular value, as you might do when verifying a username and password combination.
Pressing the ENTER key while a text field or text area has focus in the web browser can fire the OnClick event of another widget on the page, known as the text field/area's "submit button."
To assign a submit button to a text field/area, use the Submit Button dropdown in the More Properties menu in the Interactions pane to choose from a list of eligible widgets.