Welcome to the LimeSurvey Community Forum

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

Load data from custom table

More
6 years 9 months ago #155499 by malp
Load data from custom table was created by malp
Hello, is there a way to pre-fill an input field with data loaded from a custom db table?

I.e.: I have a database table with some user's information and I'd like to precompile some input fields with these info (the survey is not public). Then, the user can edit the info if they are not correct/updated.

Is this possible without using ajax?

Thank you
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago - 6 years 9 months ago #155506 by tpartner
Replied by tpartner on topic Load data from custom table
There is no built-in facility to access external databases.

You may be able to use the RemoteControl 2 API to load the data into token attributes - manual.limesurvey.org/RemoteControl_2_API

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 6 years 9 months ago by tpartner.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago #155518 by holch
Replied by holch on topic Load data from custom table
Maybe you can use the token table with custom attributes for that? Depends on how you invite respondents.

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.
More
6 years 9 months ago #155534 by malp
Replied by malp on topic Load data from custom table
Thank you both.
Yes, I could use the token table, as suggested by holch, but reading ls documentation I didn't understand where I have to insert the {TOKEN:..} tag to fill the question's field.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 9 months ago #155538 by tpartner
Replied by tpartner on topic Load data from custom table
Depending on the question type, you can put something like {TOKEN:ATTRIBUTE_1} in the "Default answer" field.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose