Help Center

Survey Question Post-filling

No comments

That is the same as pre-filling, but answers are filled in after the page is submitted and the answers for the page are saved. That means that you can use CSL, that refers to questions on the same page for post-filling!

For example:

You have 5 questions with scores and and a ‘Total’ hidden slider question. The slider question, even though it is on the same page with 5 questions, can be post-filled with the sum of the scores.

No need to place it on the next page.

Questions with post-filling should be hidden and not required.

You can find the post-filling setting on the ‘Prefill’ tab when pre-filling is set to ‘Fixed text or CSL’.

It can also be used to modify the answer of a respondent. Since post-filling is always done, even if a question already has an answer, which is also different from prefilling.

Steps to set up post-filling

In the question editor, you can specify a response for a question ahead of time. This can be a fixed value, a variable, or a random selection.

How to set prefill values for a question:

  1. Go to your CheckMarket account
  2. Open your survey
  3. Click Edit.
  4. Create or edit a question.
  5. Enter the answer options.
  6. Click on the Prefill tab.
  7. Select Fixed Text or CSL.
  8. Enter your CSL in the text area.
  9. Select Yes, next to Postfill value after page is submitted?
  10. Click on Save.

Mark the question as not required.

Test the post-filling of the question and then mark the question as Hidden.

Postfill a question to use in display logic and branching

Sometimes, you want to use a calculation or other CSL in page display logic or branching. Since this cannot be done directly, you can use your calculation to post-fill a question. Then you can use the question in your display logic or branching. There is an added advantage, that the question will also be available in the reporting for filters. Say you want to show a page if a respondent selected more than 1 answer in a checkboxes question, maybe to show them a rank-order question.

To get started, create a hidden radio buttons question, ‘More than 1 option chosen?’, with two answer choices, ‘yes’ and ‘no’, at the bottom of the page with the checkboxes question. Make sure your checkboxes question has a data label since you will need it to refer to the CSL. Then in the radio buttons question, go to the Prefill tab and select ‘Fixed text or CSL’ and enter the following CSL:

{{#if (gt (count respondent.questions.myLabel.answerChoices) 1)}}yes{{else}}no{{/if}}

What this says is, if the count of answer choices selected in the question with data label ‘myLabel’, is greater than (gt) one, select ‘yes’ otherwise select ‘no’.

You can also replace the ‘yes’ and ‘no’ in the code with ‘1’ and ‘2’, which stands for the first and second answer choice. You will need to that if your survey is multilingual.

Select Yes, next to Postfill value after page is submitted?

Now you can use the radio buttons question in your display logic, branching and reporting.

Order of execution

The order of processing can be very important. Here is the order in which post filling occurs:

  1. Answers are saved in the order they are placed on the page.
  2. After the answers to the questions have been saved, the system cycles through them again, in the order they appear, and post-filling is processed.
  3. Display logic and branching are checked to see which page to render next.

Since all the answers are first saved then post-filling is done, means that question 1 can be post filled with a value that depends upon an answer to question four, if they are on the same page.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.