Components
Steps

Steps

The Steps steps component is a layout field, use it to organize fields in multi-step forms. Fields are defined in fields key as hash object, each key of the fields objects is an array of fields and must match the values of the tabs array of object.

Example

{
  "component": "steps",
  "name": "my_steps",
  "tabs": [
    {
      "value": "one",
      "label": "One"
    },
    {
      "value": "two",
      "label": "Two"
    },
    {
      "value": "three",
      "label": "Three"
    }
  ],
  "fields": {
    "one": [
      // fields for step 1, i.e.
      // {
      //    "component": "input-text",
      //    "name": "my_field",
      //    "label": "My Field"
      // }
    ],
    "two": [
      // fields for step 2
    ],
    "three": [
      // fields for step 3
    ]
  }
}

LetsForm DSL

The above example can also be defined with LetsForm DSL

<LfSteps name="my_steps">
  <LfStep value="one" label="One">
    <LfField
      component="input-text"
      label="Field 1"
      name="field_1"
    />
  </LfStep>
  <LfStep value="two" label="Two">
    // ...more fields
  </LfStep>
  <LfStep value="three" label="Three">
    // ...more fields
  </LfStep>
</LfSteps>
Loading...

Reference

PropertyTypeDescription
componentstring
= "steps"
namestringThe name of the field and the key of the JSON
hiddenbooleanHides the field from the form
labelNextstring | i18nLabel for next button
labelPreviousstring | i18nLabel for previous button
alignstringValues: "left", "center", "right".
Pick up a framework to show specific properties

Properties for step object

PropertyTypeDescription
valuestringInternal name for step, to be used with Form Scripts
labelstringName of the step
Pick up a framework to show specific properties
React Suite