TextBox

Capture a text input from a user and pass it through to a script using the click event on a button or link.

You can use a textbox as a single-line input field or as a multi-line field. Use a script to capture the values from this field.



Add a TextBox


Properties

  1. Text

    This text will be shown in the TextBox when the field loads.
  2. Classes

    Classes for the TextBox.
  3. Styles

    • Font - Set the TextBox's text properties.
    • Colour - Set the colour of the TextBox's font, background and border.
    • Margins - Set the margins (space) between the TextBox's border and the nearest other control. (The value can be in cm, px or %, e.g. 10px)
    • Padding - Set the padding (space) between the TextBox's text and the border of the TextBox. (The value can be in cm, px or %, e.g. 15%)
  4. Hint

    Some placeholder text that will show when the TextBox is empty.
  5. IsPassword

    If you check this checkbox the contents of the TextBox will be masked and not visible to the user, but the value can still be captured in a script.
  6. Read-only

    Set to True if you want the control to display as read-only (value can't be changed) on the page.
  7. Validations

    Validations you can apply to the TextBox.
  8. Visible

    Set to False if you don't want this control to render on the page and be visible to the user.
  9. Visible Lines

    Set the height of the TextBox in lines. Password will always be 1, no matter what is set here.

Assigning data to a TextBox

Example:

To display a TextBox containing a specific value retrieved by a SQL query:

  1. Use an appropriate Event, e.g. Load (page) or Click (button) to which a SetValue action can be added.
  2. Add a SetValue action to assign the field value from the query to the TextBox's Text property.

Retrieving data from a TextBox

Properties that can contain data:

  • Text

Use an action to capture the values from the control. Go here for more details on how to collect data from controls.