- Posts: 18
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
filling dropdown with values from MySQL in LS 3.4
- digitaldust
- Topic Author
- Offline
- New Member
Less
More
6 years 1 month ago #165255
by digitaldust
filling dropdown with values from MySQL in LS 3.4 was created by digitaldust
I am on Limesurvey 3.4 and Mac OSX, and I have created a new database in the same MySQL where LimeSurvey is running (bitnami install on AWS).
Much in the spirit of this article 3. Input from a MySQL database (trickiest, but also the most versatile and secure). , I'd like to connect to my database and retrieve values to be displayed in a dropdown, but I am not sure if the article still applies to versions >3.
Plus, I don't understand from the article in what folder do I have to put the php files. Can anyone share some insights?
Much in the spirit of this article 3. Input from a MySQL database (trickiest, but also the most versatile and secure). , I'd like to connect to my database and retrieve values to be displayed in a dropdown, but I am not sure if the article still applies to versions >3.
Plus, I don't understand from the article in what folder do I have to put the php files. Can anyone share some insights?
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
6 years 1 month ago #165291
by Joffm
You can set the include path to the folder where you saved your files, without the setting of the include path just enter the correct folder into the "require_once"-statement.
But there is one thing to remember:
Jquery UI is not included in the templates anymore.
See here:
www.limesurvey.org/forum/development/114...r-using-autocomplete
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic filling dropdown with values from MySQL in LS 3.4
Here in the code you see it.I don't understand from the article in what folder do I have to put the php files
You can set the include path to the folder where you saved your files, without the setting of the include path just enter the correct folder into the "require_once"-statement.
Code:
// Include files outside of webroot set_include_path('/var/www/surveys/test-survey'); // Fetch database credentials require_once ('constant.php'); // Connect to database and perform query require_once ('database.php');
But there is one thing to remember:
Jquery UI is not included in the templates anymore.
See here:
www.limesurvey.org/forum/development/114...r-using-autocomplete
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: digitaldust
The topic has been locked.
- digitaldust
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 1
6 years 1 month ago #165309
by digitaldust
Replied by digitaldust on topic filling dropdown with values from MySQL in LS 3.4
thank you for your message, actually it's me also in the thread you linked...
I realize it's super tricky to install jquery-ui...
I realize it's super tricky to install jquery-ui...
The topic has been locked.