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)
Name | Type | Description | Rules |
---|---|---|---|
name | string | Name for the input field. Examples: "metadata". | MaxLength: 50 MinLength: 3 Pattern: ^(?!\s*$).+ |
label | string | Label for the input field. Examples: "Enter your name". | MaxLength: 50 MinLength: 3 Pattern: ^(?!\s*$).+ |
type | string | (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 . |
submitLabel | string | Label for the submit button. Examples: "Submit". | |
placeholder | string | Placeholder text for the input field. Examples: "John Doe". | |
minlength | number | Minimum length of input. Examples: 0. | |
maxlength | number | Maximum length of input. Examples: 100. | |
autofocus | boolean | Whether the field should automatically get focus. Examples: true. | |
autocomplete | boolean | Whether autocomplete should be enabled for the field. Examples: true. | |
max | string | Maximum value for number input. Examples: "100". | |
min | string | Minimum value for number input. Examples: "0". | |
pattern | string | Regex pattern for input validation. Examples: "^[A-Za-z]+$". | |
step | number | Step 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]+$"
}
}