Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Prepopulate a text array using the URL

More
10 years 3 months ago #121072 by Steve__777
I am trying to prepopulate a text array using the start URL.
https://localhost/index.php?r=survey/index/sid/588745&lang=en&newtest=Y&PersonalDetails_Personal_Title=Mr
Where PersonalDetails is the question code, Personal is the Y axis code and Title is the X axis code.
Nothing gets displayed in the array.
When I try this with a simple short text answer it does work.
https://localhost/index.php?r=survey/index/sid/588745&lang=en&newtest=Y&Phone=1234567890
Where the question code is Phone and the answer is populated with the right number.
What am I doing wrong?
The topic has been locked.
More
More
10 years 3 months ago - 10 years 3 months ago #121085 by tpartner
Yes, as jelo suggests, you can use the full SGQA in the URL.

So, for example, given:
  • Survey ID - 111111
  • Group ID - 22
  • Question ID - 33
  • Sub-question ID - SQ001
  • Answer ID - A1
Something like this will work:
Code:
https://pathToLimeSurvey/index.php/survey/index/sid/111111/newtest/Y/lang/en?111111X22X33SQ001_A1=prepopulateValue

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 10 years 3 months ago by tpartner.
The topic has been locked.
More
10 years 3 months ago #121155 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose