Single Line Fields

Single line fields are the least specialized of all the field types in Laserfiche Forms. They accept numbers and characters, making them well suited for accepting names, numbers, and many other values. If there is a chance that the user filling in this field will enter a combination of characters and numbers, you should use a single line field rather than a more specialized one.

Single line fields are also incredibly useful because you can use regular expressions with them to restrict what the field accepts. In addition, single line fields can accept HTML input.

Example: You can use regular expressions with single line fields to ensure that phone numbers or Social Security numbers are entered with the proper formatting. Learn more

Note: A form user cannot enter the characters "&", "#", or "<" followed by another character. However, you can use these characters when there is a space between any of the three characters and the following character.

Settings

To edit a single line field

  1. Select the field on the canvas, and the options will appear in the right pane.
  2. Under Field label, enter the field label that will appear next to the field on the form.
  3. Under Variable, specify a name for the field variable associated with this field. If you do not specify a variable name, Forms will automatically assign the field one based on its label.
  4. Under Text above field and Text below field, you can enter any additional text that should appear with the field. Click the Insert variable button to include a variable with this text.
  5. Select Required if users must fill in this field before submitting the form.

    Note: If a required field is hidden with a field rule, it is no longer required. A required field is only required when it appears on the form.

  6. Select Read-only if users should not be allowed to modify this field.

    Example: Sue has a "Case ID" field that is auto-populated from the company database using a Lookup rule. To ensure nobody can change the case ID on the form, Sue makes this field read-only.

  7. Select the Accept barcode scan option to allow Laserfiche App devices to scan barcodes with the camera and automatically insert the value into the field.
  8. Under Placeholder text, enter a value that will be displayed as a tip to the user but will not be stored in the form. Click the Insert variable button to include a variable with this text.
  9. Under Default value, enter the value that will appear in the field by default. If this option is blank, the field will appear empty by default. Click the Insert variable button to include a variable with this text.
  10. To configure advanced options, click the Advanced tab.
    • Under Calculation, specify a formula that will populate the contents of this field. Learn more
    • Under Character limit, enter the maximum number of characters the field will accept. By default, this number is 20,000.
    • Under Auto suggestions, enter any suggestions that should appear as users fill in this field.
    • Under Tooltip, specify the help text that will appear when users hover over the field.
    • Under CSS classes, specify CSS classes to assign this field. The form designer allows multiple classes to be selected. Learn more about using CSS
  11. Under Perform Custom Input Validation select from the following options:
    • Use regular expression: Specify a regular expression to limit the values that this field will accept or to format values in a specific way. Learn more about regular expressions
    • Use an input mask: Specify an input mask following the guidelines below.
  12. To configure field specific rules, click the Rules tab.
  13. Your field changes will be applied to the form automatically.
  1. Select the field on the canvas and click Edit.
  2. Under Field label, enter the field label that will appear next to the field on the form.
  3. Under Variable, specify a name for the field variable associated with this field. If you do not specify a variable name, Forms will automatically assign the field one based on its label.
  4. Under Field options, select Required if users must fill in this field before submitting the form. Select Read-only if users should not be allowed to modify this field.
  5. Example: Sue has a "Case ID" field that is auto-populated from the company database using a Lookup rule. To ensure nobody can change the case ID on the form, Sue makes this field read-only.

    Note: If a required field is hidden with a field rule, it is no longer required. A required field is only required when it appears on the form.

  6. Select the Accept barcode scan option to allow Laserfiche App devices to scan barcodes with the camera and automatically insert the value into the field.
  7. Using the Text above field and Text below field, you can enter any additional text that should appear with the field. Click the Insert variable button to include a variable with this text.
  8. Under Field width, select whether the field should be small, medium, large, or x-large in width.
  9. Under Character limit, enter the maximum number of characters the field will accept. By default, this number is 20,000.
  10. Under Default value, enter the value that will appear in the field by default. If this option is blank, the field will appear empty by default.
  11. To configure advanced options, click the Advanced tab.
    • Under Calculation, specify a formula that will populate the contents of this field. Learn more
    • Under Tooltip, specify the help text that will appear when users hover over the field.
    • Under Auto suggestions, enter any suggestions that should appear as users fill in this field. Click the number next to a suggestion to make it the default value for the field.
    • Under Regular expression for validation, specify a regular expression to limit the values that this field will accept or to format values in a specific way. Learn more about regular expressions
    • Under CSS class, specify a CSS class to assign this field. Learn more about using CSS
  12. When you are finished editing the field settings, click Done. Your changes will be applied to the form automatically.

Simplified input mask information

Mask character Character description
0 Any single digit, required. This element will accept any single digit between 0 and 9.
9 Any single digit or space, optional.
# Any single digit, space, plus (+) or minus (-) sign, optional.
L Any single letter, required. This mask element is equivalent to [a-zA-Z] in regular expressions.
? Any single letter, optional. This mask element is equivalent to [a-zA-Z]? in regular expressions.
A Any single alphanumeric character, required. This mask element behaves similar to the "a" element.
a Any single alphanumeric character, optional. This mask element behaves similar to the "A" element.
\ Escape. Escapes a mask character, turning it into a literal. "\\" is the escape sequence for a backslash. "\A" results in a literal "A"

Examples:

Use case Masking syntax
US format phone number (000) 000-0000
Social Security Number 000-00-0000
Canadian Postal Code L0L 0L0