Appearance
Forms
Page Flow Blocks reference.
Blocks
- Data Table Attach Form
- Delete Uploaded File
- Enable or Disable Delete File Action for Field
- Enable or Disable New File Uploads for Field
- Form Data
- Form Events
- Form is in Edit Mode
- Form Original Edit Data
- Form Submit Complete
- Lock or Unlock Form
- Popup Form Data
- Remove Un-uploaded File
- Reset Form
- Save Form with Data
- Set Form Event Status
- Set Form Event Status Message
- Show Information Popup
- Show Popup Form
- Un-uploaded File List for Field
- Uploaded File List for Field
Data Table Attach Form
Block name: datatableattachform
Attaches one of your app forms to a Data Table widget for creating and or editing records.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| data table | element | The id of the Data Table widget that should use the attached form. Use the element's HTML id attribute value. Do not use AI IDs such as ai:... or data-tvwa-ai-id; those IDs are only for modification commands. You can type the element id directly or click the lookup button to select from valid elements available in the current context. | |
| attach type | choice | Which Data Table actions should use the attached form. | |
| form slug | string | The form slug to use for the selected Data Table actions. | |
| title | string | The modal title to show when the attached form opens. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the Data Table widget element and sends an attach-form command with the selected form configuration.
Calls: $io.dom.elementIdSel, $io.ui.widgetCommand
Related Blocks
Delete Uploaded File
Block name: form_mark_uploaded_delete
Marks an uploaded file for deletion, or cancels an existing delete mark for that file.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| field | string | The file field name to update. This is typically provided by a text block. | text |
| name | string | The uploaded file name to update. This is typically provided by a text block. | |
| cancel | boolean | Whether an existing delete mark should be canceled. This is typically provided by a logic_boolean block. Use false to mark the file for deletion, or true to cancel a previously marked deletion. | logic_boolean |
Output
This block does not produce an output value.
Behavior
Generates client-side code that marks an uploaded file for deletion, or cancels that mark when the cancel input is true.
Calls: $io.form.markUploadedFileForDelete
Related Blocks
Enable or Disable Delete File Action for Field
Block name: form_set_file_delete_state
Enables or disables the delete-file action for a form file field.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| action | choice | Whether delete-file actions should be enabled or disabled for the field. | |
| field | string | The file field name to update. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates client-side code that updates whether delete-file actions are disabled for the selected field. The runtime call uses a disable flag, so choosing Enable causes disableFileDelete to receive false.
Calls: $io.form.disableFileDelete
Related Blocks
Enable or Disable New File Uploads for Field
Block name: form_set_file_upload_state
Enables or disables new file uploads for a form file field.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| action | choice | Whether new file uploads should be enabled or disabled for the field. | |
| field | string | The file field name to update. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates client-side code that updates whether new file uploads are disabled for the selected field. The runtime call uses a disable flag, so choosing Enable causes disableFileUpload to receive false.
Calls: $io.form.disableFileUpload
Related Blocks
Form Data
Block name: formdataobject
Provides an object containing the current values entered in the form fields.
Output
This block produces an output value of type Any.
Behavior
Generates client-side code that reads the current form data object from the ioLoop form runtime.
Calls: $io.form.getFormData
Related Blocks
Form Events
Block name: handleformevents
Registers custom logic for key lifecycle events of a form, including initialization, validation, submission, success, and error handling.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| on init | statements | The statements to run when the form is initialized. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. | |
| on pre-validate | statements | The statements to run before form validation begins. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. | |
| on post-validate | statements | The statements to run after validation finishes. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. | |
| on submit | statements | The statements to run when the form submit action starts. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. | |
| on success | statements | The statements to run after a successful form submission. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. | |
| on error | statements | The statements to run after a failed form submission. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that registers custom form event hooks on the active ioLoop form object. The nested blocks are emitted inside generated callbacks with formInfo, returnInfo, dataObj, succInfo, and errInfo depending on the form lifecycle event, so customcode and customcodeexpr blocks inside those handlers can access the matching in-scope callback variables directly.
Calls: window.tvWaDataForm.setCustomHooks
Related Blocks
formeventreturnstatusformeventmsgformonsubmitcallbackformdataobjectformeditdataobjectformisineditmode
Form is in Edit Mode
Block name: formisineditmode
Checks whether the current form is being used to edit existing data instead of creating new data.
Output
This block produces an output value of type Any.
Behavior
Generates client-side code that checks whether the active form is currently in edit mode.
Calls: $io.form.isEditMode
Related Blocks
Form Original Edit Data
Block name: formeditdataobject
Provides the original data object being edited by the form when the form is in edit mode.
Output
This block produces an output value of type Any.
Behavior
Generates client-side code that reads the original edit data object from the ioLoop form runtime.
Calls: $io.form.getOriginalEditData
Related Blocks
Form Submit Complete
Block name: formonsubmitcallback
Signals back to the form runtime that custom submit processing has completed.
Output
This block does not produce an output value.
Behavior
Generates client-side code that tells the ioLoop form runtime that custom submit handling has finished.
Calls: $io.form.customSubmitComplete
Related Blocks
Lock or Unlock Form
Block name: lockform
Locks the active form to prevent submission, or unlocks it again after processing is complete.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| action | choice | Whether the form should be locked or unlocked. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that changes the locked state of the active form.
Calls: $io.form.lock
Related Blocks
Popup Form Data
Block name: modalformdata
Provides the data object returned by a popup form callback.
Output
This block produces an output value of type Any.
Behavior
Generates client-side code that reads the current popup form callback result object and returns its data value when available.
Related Blocks
Remove Un-uploaded File
Block name: form_remove_unuploaded
Removes a file that is attached to a form file field but has not yet been uploaded.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| field | string | The file field name to update. This is typically provided by a text block. | text |
| index | number | The zero-based file index to remove. This is typically provided by a math_number block. | math_number |
| name | string | The file name to remove. This is typically provided by a text block. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that removes a pending un-uploaded file from the selected form field by index or name.
Calls: $io.form.removeUnploadedFile
Related Blocks
Reset Form
Block name: resetform
Clears the active form's field values, validation messages, and validation state.
Output
This block does not produce an output value.
Behavior
Generates client-side code that resets the active form to its initial empty state.
Calls: $io.form.reset
Related Blocks
Save Form with Data
Block name: saveform
Submits the active form using either the current form data or a custom data object.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| data | object | The data to submit with the form. This is often provided by a formdataobject block when you want to submit the current form values, but define_object can also be used when you want to submit custom data. | formdataobject |
Output
This block does not produce an output value.
Behavior
Generates client-side code that submits the active form with the provided data object or with null when no data input is connected.
Calls: $io.form.save
Related Blocks
Set Form Event Status
Block name: formeventreturnstatus
Sets the form event status to OK or ERROR when used inside form event handling logic.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| status | choice | The status value to set for the current form event. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that sets the form event status, using the current returnInfo object when it exists.
Calls: $io.form.setStatus
Related Blocks
Set Form Event Status Message
Block name: formeventmsg
Sets the status message shown by the current form event handling logic.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| message | string | The status message to show on the form. This is typically provided by a text block, but blocks such as alert can also be used when you want formatted message content. | text |
Output
This block does not produce an output value.
Behavior
Generates client-side code that sets the form event status message, using the current returnInfo object when it exists.
Calls: $io.form.setStatusMessage
Related Blocks
Show Information Popup
Block name: informmodal
Shows an informational modal popup with a title and message, then runs the nested logic when the popup is closed.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| title | string | The popup title. This is typically provided by a text block. | text |
| message | string | The message shown in the popup. This is typically provided by a text block. | text |
| customization | object | Optional modal customization settings. | |
| when closed | statements | The blocks to run after the popup is closed. Nested blocks run inside the generated callback for this block. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that shows an informational modal popup and runs the nested statements after the returned promise resolves. The nested blocks are emitted inside function() { ... }; that callback does not define a result parameter.
Calls: $io.ui.showInfoModal
Related Blocks
Show Popup Form
Block name: showmodalform
Shows one of your app forms as a modal popup and lets you handle save success and close results. This is the normal way for another page to open an ioLoop form; do not create a normal page link or navigation action to a form unless the author explicitly asks for a standalone form URL.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| form slug | string | The form slug to open in the popup. | |
| title | string | The popup title. This is typically provided by a text block. | text |
| data | object | Optional data object to pass into the form, for example when opening the form for editing. | |
| customization | object | Optional modal customization settings. | |
| shared info | object | Optional shared information object to pass into the popup form. Inside the popup form's Page Flow, this shared information is accessible through the tvexportobject block. In JavaScript code, properties in this same shared object can also be accessed with $io.system.getFlowShareData and updated with $io.system.setFlowShareData. | |
| on save success | statements | The blocks to run when the form reports a save success result. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. | |
| on form close success | statements | The blocks to run when the popup form closes with a success result. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. | |
| on form close failure | statements | The blocks to run when the popup form closes with a failure result. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that opens the requested form in a modal popup and wires the nested statement blocks into the modal callbacks. The nested blocks are emitted inside function(mdlResp) { ... }, so customcode and customcodeexpr blocks inside the modal callbacks can access mdlResp directly. Prefer this block over page navigation when a button, menu item, table action, or link-like UI should open a form.
Calls: $io.ui.showFormModal
Related Blocks
Un-uploaded File List for Field
Block name: formunuploadedfilelistforfield
Gets the list of files that are currently attached to a form file field but have not yet been uploaded.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| field | string | The file field name to inspect. This is typically provided by a text block. | text |
Output
This block produces an output value of type Array.
Behavior
Generates client-side code that reads the pending un-uploaded file list for a form file field.
Calls: $io.form.getUnUploadedFiles
Related Blocks
Uploaded File List for Field
Block name: formfilelistforfield
Gets the list of files that have already been uploaded for a form file field.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| field | string | The file field name to inspect. This is typically provided by a text block. | text |
Output
This block produces an output value of type Array.
Behavior
Generates client-side code that reads the uploaded file list for a form file field.
Calls: $io.form.getUploadedFiles

