Add Hidden Field with Custom Value
Audience:
Low-code EngineersSkill Prerequisites:
Forms,Tokens
Adds a hidden field with a value of your choice to a Dynamic Field Container when the form loads. The value isn't shown to the user but is submitted with the form. It works like a Hidden Field with Custom Value placed in the form builder.
See Dynamic Fields for how dynamic fields work and how to set up the container.
Hidden fields can be changed by anyone using the browser's developer tools. Don't use them for values that must be trusted, such as prices or user IDs. Recalculate those on the server when the form is submitted.
Typical Use Cases
- Carry a value from the form's load actions to the submit actions, for example the ID of the record each dynamic field belongs to
- Store values that other fields' bind expressions use
Don't use it to
- Show read-only information. Use Add StaticText instead.
- Keep values secret or tamper-proof.
Related Actions
| Action Name | Description |
|---|---|
| Add StaticText | Displays text without submitting it. |
Input Parameter Reference
This action has the common parameters, including Secure Input, except the CSS settings, Readonly, Is Required, Validation Condition, the custom validators and Tokenize Validators?.
Set the value in Initial Value. Field Title is still required, even though it isn't shown.
Output Parameters Reference
| Parameter | Description |
|---|---|
| Field ID Token Name | Optional. Token that receives the cleaned field ID. If empty, the ID is saved in [<FieldId>:Name]. |
When the form is submitted, the value is available in [<FieldId>].
Examples
To understand how to use the below examples, please see Running Examples.
1. Store a record ID for each list entry
Put this action inside an Execute Actions for each List Entry that loops over a Tasks list, in the form's On PreInit or On Init actions. It stores each task's ID in a hidden field.
{
"Title": "Add Hidden Field with Custom Value",
"ActionType": "AddHiddenField",
"Description": "Remember the task ID",
"Condition": null,
"Parameters": {
"ContainerId": "TaskFields",
"FieldId": "TaskId[Tasks:Id]",
"FieldName": "Task ID",
"InitialValue": "[Tasks:Id]",
"SecureInput": true,
"FieldIdTokenName": ""
}
}
Revised 09/25/2026