Form

Skuid’s Form is a data component that allows you to view and edit a single record. In contrast to Tables, which show multiple records and allow for mass updates, the Form shows details for a specific record, which can be updated inline. If multiple records are present in the model, a Form will appear for each separate record.

Using the Form component

At its most basic level, the Form is used to edit fields on a single record. Using different properties and elements of the Form, however, it is possible to guide end users through the process of updating a record on a single page

After you add a Form to the page, adding columns, sections, and fields to the Form allows for a more specific user experience, directing users through the exact steps necessary to input or update required information. Columns, sections, and rows provide great control of where editable fields appear, but also affect the order in which items are read on a Skuid page. When a Field is added within columns or sections, a row is generated containing that field. Fields add specific instruction or guidance through labels and additional prompts.

Columns

  • Add as many columns as you need by clicking the Add columns button in the Form header.

    • Columns are adjustable in the properties pane where you can change order, alignment, and responsive behavior.
  • Remove columns by clicking the column, then the delete Remove columns.

Sections

  • Add Sections by highlighting the Form component and clicking Add section.

    • Sections are adjustable in the properties pane where you can turn section titles on/off and edit section titles.
  • Remove Sections by clicking the section, then clicking delete Remove section.

Fields and rows

Add fields to sections by highlighting the section, clicking Add, and selecting Model fields from the dropdown menu.

  • Add a field you want end users to read, edit, or both from the model associated with the Form component, Javascript templates, images, or column sets.

  • Adding a field will generate a row.

    • Once a row is created, you can add additional fields to that row by clicking the row border, then clicking Add.
  • Rows have no configurable properties. When a row is selected, the Properties Pane will be blank.

Buttons and images

Add a button group to a section by highlighting the section, clicking Add fields and selecting Button Group from the dropdown menu.

  • This inserts a button group directly into the Form at the selected location.
  • When you add buttons to the Form component, these buttons have their own properties. All Form button properties are the same as those for Ink Button Set buttons.

Add an image to a section by highlighting the section, clicking Add fields and selecting Image from the dropdown menu.

  • This inserts an image directly into the Form at the selected location.
  • When you add an image to the Form component, the image has its own properties. All Form image properties are the same as those for Ink Image components.

Column sets

Add column sets to a section by highlighting the section, clicking Add fields and selecting Add column set from the dropdown menu.

  • Add as many columns within the column set as you need by clicking the Add columns button in the column set header.

    • Columns are adjustable in the properties pane where you can change order, alignment, and responsive behavior.
  • Remove columns by clicking the column, then the delete Remove columns.

Best practices

  • While having Save/Cancel buttons directly above the Form may be useful in most cases, consider using one save button per page to remove visual clutter and reinforce how to save page data to the end user.
  • If your model contains many records or is a related list, consider using a Table component instead.
  • While Forms allow for focused form-filling, they are not very interactive. If the records on your page require extensive use of the Action Framework, consider using a Button Set component for those actions, or using the Deck component instead.
  • There is no limit on how many fields you can add to a row, but it’s best to only use two to three. Adding more than three fields makes the form content difficult to read and navigate.

Other features

Use a character counter in string and textarea fields

A character counter helps end users know when they are approaching the content limit for text entry fields and encourages them to make input more succinct. Skuid property Show length counter adds a counter for string fields and the larger textarea fields:

  1. Click the string or textarea field within the component.
  2. In the Field Properties pane, check Show length counter.

When editing the field, end users will now see a character countdown (“25/ 128”) that indicates the number of characters used (the first number) and how many total characters are allowed (the second number).

Note

  • The counter is enabled by default for standard textarea fields.
  • The counter is not available for Salesforce rich text area type fields.

Change the field character limits

When using the counter, the character limits are preset by the data source. (For example, Salesforce sets a limit of 128 characters for string fields, and 3200 characters for textarea fields). These limits are set by the field’s metadata.

To change the limit:

  1. Click the model with the field whose limit you want to override, then click Fields.
  2. Click the specific textarea or string field.
  3. In the Field’s Description pane, check Override field metadata.
    • Under Length, set the length to the desired number of characters.
  4. Click Save.

For more information on field metadata overrides, see Field Metadata Overrides.

Properties

(Just need to look up a property? Try going directly to the Property Library.)

Form properties

General tab [[]]

  • Model: The model that contains the fields the Form displays. Revisions made in the Form affect the model selected here.

  • Default mode: Select the default record interaction for end users. Options are:

    • Read with inline-edit (default): All fields will appear in read mode but can be edited on click if a user has permission to do so.
    • Edit: All available fields appear in edit mode on page load.

    Note

    Forms are most easily read in Edit mode.

    • Read-only: All fields appear in read-only mode regardless of user permissions.
  • Show save and cancel buttons: If true, Save/Cancel options will appear allowing end users to save changes made within the Form. If false, the Save/Cancel buttons will not appear above the component.

Display tab [[]]

Field Layout section [[]]
  • Label position:

    • Top: The field’s label displays above the field.

    • Left: The field’s label displays to the left of the field.

      • Label minimum width and Label maximum width: Sets the lower and upper size limits for the label.
      • Label flex ratio: Sets the size of this label relative to the input field’s width.
      • Input field/text minimum width and Input field/text maximum width: Sets the lower and upper size limits for the input field.
      • Input field/text flex ratio: Sets the size of this input field relative to the label’s width.
Errors section [[]]
  • Show errors inline: Display messages next to the field
  • Show inline error only on hover: Only displays the message inline if the end user hovers over the field.
Advanced section [[]]
  • Unique ID (optional): Skuid automatically generates an alphanumeric ID for the component; if preferred, give it a practical name.

Styles tab [[]]

Global styles for this component are set in the Design System Studio. The following Style properties can be adjusted for an individual page.

  • Style variant: Style variants are created and set in the Design System Studio. Some components have pre-defined variants for a specific aspect of a component’s style. Also, Skuid builders can style and customize elements to create their own themes within the DSS. These themes will dynamically populate as selectable values in the Style Variant dropdown menu.

  • Spacing: Sets the spacing of the component relative to other components on the page. Spacing can be managed for Top margin, Bottom margin, Left margin, and Right margin. All margins can be set to one of the following:

    • None
    • Extra Small
    • Small
    • Reduced
    • Regular
    • Increased
    • Large
    • Extra Large
    • Huge

    Note

    These sizes are relative to one another; the baseline is determined by Design System settings.

Display logic tab [[]]

Standard display logic options are available to display or hide the component or feature.

Column properties

  • Division behavior: Determines how the column will size itself in relation to other columns within the Form component.

    • Flexible width: Flexible width columns take up as much room as is available; when the screen size shrinks they also size down to their minimum width before wrapping within the Form component.

      • Flex ratio: This sets the size of this column relative to other columns. For example, if there are two columns in a Form component, and the flex ratio for each is 1, they will each take up ½ of the Form. If one has a flex ratio of 2, and the other has a flex ratio of 1, the first one occupies ⅔ of the Form, and the second one occupies ⅓ of it.
      • Minimum width: Sets the lower limit for the column’s width. This can be specified using px, em, rem, %, vh, or vw measurements.

      Note

      Make sure the column’s minimum width is at least as wide as its contents!

    • Fit to content: This sizes the column to fit the width of the content within the Form component.

    • Specified width: Sets a fixed width for the column.

      • Width: Sets the width of the column. This can be specified using px, em, rem, %, vh, or vw measurements.
  • Vertical align: Adjusts vertical alignment to top, center, or bottom of the column.

  • Change order: Adjusts the order in which columns appear from left to right.

Display logic tab [[]]

Standard display logic options are available to display or hide the component or feature.

Section properties

  • Show section heading: Toggle section title text at the top of a section.
  • Section heading: Update text that appears in section header.

Display logic tab [[]]

Standard display logic options are available to display or hide the component or feature.

Field properties

Once fields are added to the Form component, each field has a specific set of properties. These properties vary, depending upon the field type. Click on the field within the Form to reveal and edit its properties.

Template fields

In addition to adding Fields from the Add Fields drop down on the component, it’s possible to add a Template. This creates a field on the table which can be configured from the Field Properties tab.

Template fields provide a way to display arbitrary text or HTML alongside field data. Other fields may be included within a template field through the use of merge syntax.

A basic template field for a full name may look like this:

{{FirstName}} {{LastName}}

It is also possible to update any fields included within a template field at runtime by double-clicking the Template field within the component.

For additional information, see Using Fields.