Add prompts
A form consists of blocks of prompts, which are fields or lists where users can respond to a prompt or enter some data. You can set limits or response options for blocks and set conditions for showing or hiding blocks depending on how the user responded to other prompts.
Add a prompt block
-
Select a form. The Constructor tab opens.
-
To add a prompt block to the form, select it from the list on the left and drag it to the workspace. To learn more about how different prompt blocks work, go to What prompts to use.
-
In the Edit a response window that opens, set the block parameters. To configure a previously added block, click it.
-
To change the order of prompts, hover over the block and drag the icon to where you want it.
-
If you want to show or hide a block depending on how the user responded to other prompts, set the block display conditions.
-
To remove a prompt block, click .
-
To split a form into multiple pages, click Add page at the bottom of the workspace. Users can switch between form pages using the Next and Back buttons.
Warning
Users can't go to the next page until they fill in the required fields.
-
To see what the form you created looks like, click Preview.
Configure prompt parameters
To configure the parameters of a prompt block, click it. This opens the Edit a response window:
-
On the left of the window, you can configure prompt parameters.
-
On the right of the window, you can see what the prompt looks like in the form.
Depending on the prompt type, different parameters are available for editing:
-
Prompt: The main text in the block. It is usually a field header or a prompt for the user to respond to.
-
Responses: Parameters for blocks where the user needs to select responses from multiple options. You can set a list of acceptable responses or limit the choice of responses (for example, for prompts to select a date or city).
-
Settings: Parameters you can use to set limits or additional block properties. For instance, you can require the user to fill in a field or configure the sorting of response options.
-
Validation: Works for some types of fields, such as Number or TIN. Use validation to check the response format. If the format is incorrect, the user sees a warning. For more information, see the Response validation section.
For more information about parameter descriptions, see Prompt reference.
Configure pre-filling for text and numeric fields in a form
The default values can only be added for text and numeric fields. To pre-fill fields of other types, configure pre-filling for the form.
Prompts that pre-filling is available for:
To have the preset values automatically inserted into the fields of the form once it is opened, add the default values:
-
Click the prompt. This will open the Edit a response window.
-
Click
Add default value. -
Enter the value to pre-fill the field with.
-
Click Save.
Set conditions for showing a prompt
You can show or hide a block depending on how the user responded to previous prompts:
-
Hover over the section and click the .
-
Select the provided option
-
Set the condition for showing your prompt:
-
Select the prompt that determines whether to show or hide the block.
You can only pick a prompt that precedes the block being set up.
You can't set the condition for showing the first prompt. -
Choose a comparison operation: equal or not equal.
-
Select or enter a response that the user's response needs to match.
-
-
To add multiple conditions, click Add condition and set a logical operator.
If you put the AND logical operator between two conditions, both of them must be met. If you use OR, at least one condition must be met.
If you add multiple conditions with different operators, the conditions are checked from top to bottom. The AND operator doesn't take priority over the OR operator.
Note
To make sure results are predictable when checking a group of conditions, we recommend using just one operator type: all conditions with AND or all conditions with OR.
How to add a field for an arbitrary response
To allow a user to give an arbitrary response in a form with a fixed set of responses, use a condition for showing a prompt:
-
Add prompts to the form:
-
Multiple answers or One answer with multiple response options. In addition to fixed responses, set an arbitrary response, such as "Other".
-
Short text. The user can enter any text in this field.
-
-
In the constructor, hover over the "Short text" prompt and click .
-
Select the provided option
-
Set the condition for showing your prompt:
-
Select a prompt with fixed response options that determine whether to show or hide the block.
-
Choose a comparison operation equal.
-
Select "Other".
-
This way, if the user selects "Other" in a multiple-choice prompt, they will see a field for entering any text.
What prompts to use
If you aren't sure which prompt block is right for your form, use the table:
What kind of response you want to get | Which block to choose |
---|---|
Any word or short phrase. For example, a name. | Short text |
An arbitrary long text. For example, feedback | Long text |
Number. For example, an amount of money. | "Number" block Integer |
Date or date range. For example, the date of an event. | Date |
Email address | "Email" block |
Phone number | Phone |
Link. For example, a link to a social media profile. | Link |
File uploaded by the user. For example, photo. | File |
A response selected from the suggested options. For example, a product color. | Drop-down list "One answer" block |
Multiple responses selected from the suggested options. For example, a request for multiple services. | "Multiple answers" block |
The name of a city or country. For example, the user's place of residence. | Cities and countries |
Multiple ratings on a scale. For example, rating an event using multiple criteria. | Rating on a scale |
Agreement with a statement or acceptance of an action. For example, consent to receive emails. | Yes/No |
A response to a test prompt that earns points for correct responses. | Prompts from the Tests and quizzes category: |
Information that doesn't require a response. For example, a header for a group of prompts. | Text with no questions |
TIN of company | TIN |
Responses to a group of repeating prompts. For example, you may need to specify the details of several participants to register them for an event. | Questions series |
The name of an employee of a Yandex Cloud Organization organization | People |
Name of a department or team in Yandex Cloud Organization company | Departments Teams |
A block with response options that are loaded from a dynamic Wiki table | Wiki |