Overview

The Confirm Block is a user input block that prompts the user for confirmation. It returns either true or false based on the user’s response, making it useful for controlling flow in your application based on user inputs.

Inputs

prompt
string

The message to display to the user when prompting for confirmation. Only available when “Use Input” is enabled.

wait
any

A value to wait for before showing the confirmation prompt. Only available when “Wait For Input” is enabled.

value
string

A value that will be passed through to either the True or False output depending on the user’s response.

Outputs

output
any

The value input is passed through this output if the user confirms positively.

falseOutput
any

The value input is passed through this output if the user confirms negatively.

Editor Settings

prompt
string
default:"Please confirm to continue."

The message to display to the user when prompting for confirmation. Only editable when “Use Input” is disabled.

useInput
boolean
default:false

When enabled, allows the prompt message to be provided via the prompt input port instead of the editor settings.

useWaitForInput
boolean
default:false

When enabled, delays showing the confirmation prompt until the “Wait For” input receives a value.

renderingFormat
string

The format to render the prompt in. Can be either “preformatted” or “markdown”.

Example: Confirming a Delete Action

  1. Add a Confirm Block to your flow before a critical delete action.
  2. Set the prompt to “Are you sure you want to delete this item? This action cannot be undone.”
  3. Connect your delete action to the value input
  4. The delete action will only execute if the user confirms positively via the output port. The falseOutput port can be used to handle the negative confirmation case.

Error Handling

The Confirm Block does not typically produce errors as it simply waits for user input. However, if there are issues with the user interface or the block fails to receive a response, it may timeout and return an error.

Always provide clear and concise messages to users to ensure they understand the implications of their confirmation or denial.

FAQ

See Also