Prefilling question text based on a hidden question

5 months 2 weeks ago - 5 months 2 weeks ago #177714 by krosser
Hi guys!

I'd like to prefill a question text with data/numbers from a previous hidden question so that only I and not participants would be able to enter that data in text fields of the array. I need to include some numbers into the survey that are pulled into question text based on the answer from the first question.
I know how to prefill/tailor answers from previous questions, which are answered by participants, but how do you do it when you want to prefill or change certain words in text by yourself, depending on what has been selected/answered in previous questions?

For example,
-- the participant chooses an option from the first question.
-- Then the option is pre-linked with some text/data from an Array-Text in the next hidden question. I will prefill that table with JS code.
-- Then that text/data is shown in a number of following questions in placeholder fields {}, depending on what option is chosen in the first question.

I'm attacheing a test survey.

File Attachment:

File Name: limesurvey...1864.lss
File Size:22 KB

Many thanks in advance for your suggestions. :)

I'm using the latest LS 3.17 hosted on LS servers, not installed locally.
Last edit: 5 months 2 weeks ago by krosser. Reason: formatting

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
5 months 2 weeks ago #177722 by tpartner
If you load a hidden (by CSS) question via JavaScript, you will need to fire Expression Manager to see that value in piping/tailoring. The way to do that varies for different question types but, for example, with a text input it may be as simple as adding .trigger('change') to the jQuery chain.

Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner -
The following user(s) said Thank You: krosser

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!