Welcome, Guest
Username: Password: Remember me

TOPIC: Prefill answers with answers from another survey

Prefill answers with answers from another survey 2 years 11 months ago #69485

Hope someone can help me with this. I am creating a survey that needs to reference an array of check in and check out dates. Imagine that there are four rows that will display preferred dates and 1 column each for the check-in and check-out date respectively. The date information is being provided/collected via a separate survey that is sent to buyers and needs to be displayed in a survey that will be sent to hotels and other suppliers. Is there a way to auto-fill the answers for the dates in the hotel-directed survey using the info in the coresponding fields/answers of the buyer survey. I should note that there will always be only one response in the buyer survey.

Any help would be appreciated.

Thanks.
The administrator has disabled public write access.

Re: Prefill answers with answers from another survey 2 years 11 months ago #69515

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
The only solution to do so would be based on an Ajax call to the buyer survey. You can call a PHP script which reads out the data and writes it into a returned DIV element. The you can use Javascript to read out the field and populate a field of the survey.

A little complicated but theoretically it is possible.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: nrichster123

Re: Prefill answers with answers from another survey 2 years 11 months ago #69516

Thanks for the response. Theorhetically, there may be another way to approach this, but I haven't seen any solutions that describe how in the forums. If we use the example of using content from previous answers to fill subsequent answers and questions, is it possible to do the same thing for the content used in questions? I realize that a question can be copied during survey creation but I am asking if it is possible to simply insert the text from one question into another question using a unique identifier?
The administrator has disabled public write access.

Re: Prefill answers with answers from another survey 2 years 11 months ago #69524

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
You can only insert the answer of a previous question (previous = listed on the previous page) by using INSERTANS placeholders at the question text. To pre-fill a text field you have to use some customized Javascript.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: nrichster123

Re: Prefill answers with answers from another survey 2 years 11 months ago #69602

Thank you for your previous answers. Still working on this. I believe that the provlam may be solvable with tokens but I am still unclear about how tokens work with anonymouse surveys and how I can ensure that the token attributes will populate the fields for anyone clicking on the survey URL. Any suggestions would be appreciated.
The administrator has disabled public write access.

Re: Prefill answers with answers from another survey 2 years 11 months ago #69604

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
If the survey is set to be NON anonymous you won't be able to refer to any token data of the currently logged in user. Otherwise this would break anonymity.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.110 seconds
Donation Image