$modalAnswer

Retrieves the value entered by a user in a modal. This function is used to access the data submitted through a modal triggered by the modal trigger.

Usage: $modalAnswer[Input Value;Seperator (optional)]

Parameters:

  • Input Value: The unique identifier (input value) assigned to the specific input field within the $modal function when the modal was created. This is how you tell the function which input field's value you want to retrieve.
  • Seperator: In case a multiple answer provided in the modal like in a menu with 2 or more selected options, you can use this field to set the separator between them, by default it is ', '.

Example:

The following image illustrates how to use $modalAnswer inside the modal trigger to retrieve the value the user entered in the modal's input field:

Important

$modalAnswer can only be used within the context of the modal trigger. Attempting to use it elsewhere will result in an error or unexpected behavior.

Difficulty: Easy

Tags: modalAnswer modal modal answer