Welcome to the LimeSurvey Community Forum

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

Automatically fill survey's questions

  • rodrigoalbernaz
  • rodrigoalbernaz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #198945 by rodrigoalbernaz
Automatically fill survey's questions was created by rodrigoalbernaz
I have a survey that the person needs to fill out several times. At the beginning of the form, there are some registration issues. I would like that when she starts a new form (I am passing a link at the end of the survey with newtext = Y) that the first questions are automatically filled out, avoiding rework. I tried to use it via URL, using SGQA, as in this link: manual.limesurvey.org/Workarounds:_Survey_behaviour
http: //www.example.../survey/sid/1234/1234X43X123/Y
But it did not work. Any help please?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #198948 by Joffm
Replied by Joffm on topic Automatically fill survey's questions
Hi,

But it did not work.

This never is a good description of a problem.
Which version of LimeSurvey do you use?
Without knowing your version I used version 3.22 LTS.
Code:
https://www.myserver.de/survey/index.php/111222?newtest=Y&token=12345&Q1a=1&Q1b=2&Q1c=myAnswer
works as expected.
SGQA syntax works as well.

So there seems to be a mistake on your side.
But only seeing this

http: //www.example.../survey/sid/1234/1234X43X123/Y

it is difficult to help.

You should at least send a sample of your survey (only the related questions) as lss export.

And, please, do not double post.
You asked the same in the Portuguese part.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: rodrigoalbernaz
The topic has been locked.
  • rodrigoalbernaz
  • rodrigoalbernaz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #198984 by rodrigoalbernaz
Replied by rodrigoalbernaz on topic Automatically fill survey's questions
Hi!

Sorry double post. I didn't see the english forum first, I took a time to realize where is it.

Well, thanks for help. My limesurvey version is 3.21.0.

I post the lss file (the questions are the 1 to 4).

On the link to fill the survey again at the end, I create this link (I was testing for one question):
http://mydomain/index.php/442179?lang=pt-BR&&token={TOKEN}&newtest=Y?442179X1869X11363

I didnt realize how to use the SQGA with token. When I click on link, I got the error shared.

When I try to reload, the survey restart, but with no question prefilled.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #198989 by Joffm
Replied by Joffm on topic Automatically fill survey's questions
Sorry,

cannot import this survey.

Try again.
Copy the survey, remove everything not related to the questions to be filled, and send this lss.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • rodrigoalbernaz
  • rodrigoalbernaz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #198992 by rodrigoalbernaz
Replied by rodrigoalbernaz on topic Automatically fill survey's questions
Ok,

I think maybe I removed some header on lss. I took a screenshot of the questions too.

Thanks again.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199006 by holch
Replied by holch on topic Automatically fill survey's questions
The error message in Portuguese says that you have already filled out the survey for this specific token, which is of course correct. So you probably need to increase "uses left" for the respondent so that it can work. But for the repeat survey I would actually not use tokens, but rather pass the token from the previous survey into a hidden question so you can connect the data later.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199009 by Joffm
Replied by Joffm on topic Automatically fill survey's questions
Hi,
your export still seems to be broken.
A lot of lines are missing.

But nevertheless:
I rebuilt your questions and with this url:
URL :
Code:
https://www.myserver.de/survey/index.php/133378?newtest=Y&Q1a=Meu nome&Q1b=Meu unidade&Q1c_SQ001=0049610612345&Q1c_SQ002=00491755123456&Q1d_SQ001=mymail@mail.com&Q1d_SQ002=mymail@mail.com&Q1d_SQ003=my2mail@mail.com&Q1d_SQ004=my2mail@mail.com
I got this


So there is no issue, if there is no mistake on your side.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • rodrigoalbernaz
  • rodrigoalbernaz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199010 by rodrigoalbernaz
Replied by rodrigoalbernaz on topic Automatically fill survey's questions
Thanks a lot! I will test right now!!!!!!

Thanks for your time!
The topic has been locked.
  • rodrigoalbernaz
  • rodrigoalbernaz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199011 by rodrigoalbernaz
Replied by rodrigoalbernaz on topic Automatically fill survey's questions
One last doubt: how do I save the answers automatically to the variable of the URL ?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199022 by Joffm
Replied by Joffm on topic Automatically fill survey's questions
You use Expression Manager to pipe the variables.
Code:
https://www.myserver.de/survey/index.php/133378?newtest=Y&Q1a={Q1a}&Q1b={Q1b}...

Furthermore you may use any expression like
Code:
http://www.limesurvey.org/test.php?gender={if(sex=='Male','M','F')}&name;={name}

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: riasilva
The topic has been locked.
  • rodrigoalbernaz
  • rodrigoalbernaz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199034 by rodrigoalbernaz
Replied by rodrigoalbernaz on topic Automatically fill survey's questions
Your solution worked perfectly!!!!!!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose