Simple-value

Simple value input collects one piece of data from the user, typically through a dedicated form field.

This action enables simple value capturing using an field, supporting most HTML5 attributes as feature options. It leverages HTML5 input capabilities without relying on any built-in frameworks or JavaScript, ensuring lightweight and efficient functionality. However, features like setting it as required are not available natively. Supported input types include checkbox, color, date, datetime-local, email, password, month, number, range, tel, text, time, and week, allowing for versatile and flexible user input handling across a variety of scenarios.

Use Cases:

  • Date Input: Collecting a user's birthdate using the date input type.
  • Email Input: Capturing an email address with the email input type.
  • Checkbox: Allowing users to agree to terms and conditions using the checkbox input type.
  • Text Input: Gathering a user's name or address with the text input type.

Supported Input Types:

  • checkbox
  • color
  • date
  • datetime-local
  • email
  • password
  • month
  • number
  • range
  • tel
  • text
  • time
  • week

No products are required to use this action.

This action pairs well with the following actions.

State

The value entered by the customer.

Union

When unioned there will be no submit button shown in the gui when this action is unionized. Instead, the unionized action will be the trigger to 'save' the current entered value.

Macro level details for how union attribute behaves can be found within the Union documentation.

Features (required)

NameTypeDescriptionRules
namestringName for the input field.
Examples: "metadata".
MaxLength: 50
MinLength: 3
Pattern: ^(?!\s*$).+
labelstringLabel for the input field.
Examples: "Enter your name".
MaxLength: 50
MinLength: 3
Pattern: ^(?!\s*$).+
typestring(required) The input type for the simple value.
Examples: "text".
Possible values: checkbox, color, date, datetime-local, email, password, month, number, range, tel, text, time, url, week.
submitLabelstringLabel for the submit button.
Examples: "Submit".
placeholderstringPlaceholder text for the input field.
Examples: "John Doe".
minlengthnumberMinimum length of input.
Examples: 0.
maxlengthnumberMaximum length of input.
Examples: 100.
autofocusbooleanWhether the field should automatically get focus.
Examples: true.
autocompletebooleanWhether autocomplete should be enabled for the field.
Examples: true.
maxstringMaximum value for number input.
Examples: "100".
minstringMinimum value for number input.
Examples: "0".
patternstringRegex pattern for input validation.
Examples: "^[A-Za-z]+$".
stepnumberStep size for number input
Examples: 1.

Example

Below is an example payload for adding an action to a business process or blueprint.

{
    "type": "simple-value",
    "union": 0,
    "features": {
        "type": "text",
        "name": "metadata",
        "label": "Enter your name",
        "placeholder": "Type here...",
        "minlength": 5,
        "maxlength": 20,
        "submitLabel": "Submit",
        "autocomplete": true,
        "pattern": "^[A-Za-z]+$"
    }
}