Getting IDs for questions and responses
Question and response IDs are used to prefill a form. There are several ways to get IDs for different types of questions.
ID of the question
You can get the question ID in the Settings section of the Edit a response window.
IDs for a series of questions
You can add a series of questions to a form several times. This means that questions from a series may repeat. To distinguish between multiple instances of the same question, question IDs that belong in a series get a suffix, which is the instance number after a double underscore. The numbers start with zero: __0
, __1
, __2
.
For example, the form has a series of questions:
-
Name
with thetext_2643945
ID. -
Phone
with thephone_2752014
ID.
To prefill the fields in a series of questions, configure GET parameters:
-
For the first instance of the series, which is displayed in the form by default, use the
text_2643945__0
andphone_2752014__0
question IDs. -
For the second instance of the series, which can be added by clicking more "series of questions", use the
text_2643945__1
andphone_2752014__1
question IDs.
Response ID
To find out the response ID:
-
Select the question section.
-
In the left-hand panel, click Advanced parameters in the Responses section.
-
Copy the ID field value.
Note
IDs can be edited. IDs of responses to a single question must be unique.
Rate on scale
, Wiki
, Cities and countries
prompt types
Response IDs for the You can find out the response IDs in your browser by using developer tools. This feature is available both to the author and user of the form.
Let's see how to get IDs using Yandex Browser:
-
Open the developer tools using the keyboard shortcut Ctrl + Shift + I (for Windows and Linux) or ⌘ + Option + I (for macOS).
-
Select the tool and click the necessary response field, list, or marker.
-
You will see a fragment of the page code with the question or response parameters highlighted in the Elements tab.
-
Find the ID values in the code:
-
Question ID: Find the
name
parameter value (except for theRate on scale
question type). -
Response ID: Find the
value
parameter value.
-
For the
Drop-down list
question type, the code lists all available response options.
-
For the
Rate on scale
question type, thename
parameter contains the question ID and thedata-qa
parameter, the response ID. In the example below, this is6815528_6815524
.
-
In a question with a suggestion, such as
Cities and countries
, orWiki
, go to theResponse
requests.
The
getSuggest
section will list response options with country names and responseIDs
.
-