- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
answer code lengths
- romulusoprica
- Topic Author
- Offline
- New Member
Less
More
6 months 1 week ago - 6 months 1 week ago #251240
by romulusoprica
Romulus OPRICA
answer code lengths was created by romulusoprica
Hi guys!
Need your help, please!
I must use a 7 (may be 8 ) digit code for coding answers (standard cities code in Romania), but I am only allowed 5 digit.
I've made some changes in:
/application/views/questionAdministration/answerOptionRow.twig
Line 57: maxlength='5' – to 9
Lines 79 / 92: maxlength='9'Lines 80 / 93 size='9'
and in /application/models/Answer.php
array('code', 'length', 'min' => 1, 'max' => 5), in 9 but still doesn't work.
Any idea that will work?
Please, keep in mind that I am sociologist and I have very limited programing skills )
Thank you!
Romulus
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)
Need your help, please!
I must use a 7 (may be 8 ) digit code for coding answers (standard cities code in Romania), but I am only allowed 5 digit.
I've made some changes in:
/application/views/questionAdministration/answerOptionRow.twig
Line 57: maxlength='5' – to 9
Lines 79 / 92: maxlength='9'Lines 80 / 93 size='9'
and in /application/models/Answer.php
array('code', 'length', 'min' => 1, 'max' => 5), in 9 but still doesn't work.
Any idea that will work?
Please, keep in mind that I am sociologist and I have very limited programing skills )
Thank you!
Romulus
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)
Romulus OPRICA
Last edit: 6 months 1 week ago by romulusoprica.
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12942
- Thank you received: 3979
6 months 1 week ago #251251
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic answer code lengths
Hi,
this length is defined in the database. So, at first you had to change this.
But because of this
But a much better solution is either to use an array with a dropdown, or an autocomplete.
So you should provide a lss export of a sample survey, to show us how you want to ask this question
And next time please, answer the questions about your version, hosting, etc., which you ignored.
Joffm
this length is defined in the database. So, at first you had to change this.
But because of this
O do not recommend this.and I have very limited programing skills
But a much better solution is either to use an array with a dropdown, or an autocomplete.
So you should provide a lss export of a sample survey, to show us how you want to ask this question
And next time please, answer the questions about your version, hosting, etc., which you ignored.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- romulusoprica
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
6 months 1 week ago #251260
by romulusoprica
Romulus OPRICA
Replied by romulusoprica on topic answer code lengths
Hi, Joffm! Thank you!
I attached both the group (lsg) and the question (lsq) files. Also 2 pictures showing the same warning both the list & dropdown questions. Same for Array by column.
Using array quest instead of answers is no-go, since I have to accomodate more than 1500 places (cities, villages etc) - this would kill the database (and me, in post processing)
For me it is important to have more than 5 digits because it helps me alot in post processing.
I am willing to try doing changes in DB, but I don't know in which one
Thank you once again!
RomulusLimeSurvey version 6.3.0
LimeSurvey build 231016
Operating system Linux server-0282.whmpanels.com 4.18.0-348.23.1.lve.el7h.x86_64 #1 SMP Wed Apr 27 09:01:16 UTC 2022 x86_64
PHP version 7.4.33
Web server name cercetari.ro
Web server software LiteSpeed
Web server info HTTP/1.1
Database driver version mysqlnd 7.4.33
Database server info
Uptime: 17573024 Threads: 195 Questions: 7311531893 Slow queries: 4203677 Opens: 13346695 Flush tables: 607 Open tables: 4096 Queries per second avg: 416.065
Database server version 5.5.5-10.3.27-MariaDB
I attached both the group (lsg) and the question (lsq) files. Also 2 pictures showing the same warning both the list & dropdown questions. Same for Array by column.
Using array quest instead of answers is no-go, since I have to accomodate more than 1500 places (cities, villages etc) - this would kill the database (and me, in post processing)
For me it is important to have more than 5 digits because it helps me alot in post processing.
I am willing to try doing changes in DB, but I don't know in which one
Thank you once again!
RomulusLimeSurvey version 6.3.0
LimeSurvey build 231016
Operating system Linux server-0282.whmpanels.com 4.18.0-348.23.1.lve.el7h.x86_64 #1 SMP Wed Apr 27 09:01:16 UTC 2022 x86_64
PHP version 7.4.33
Web server name cercetari.ro
Web server software LiteSpeed
Web server info HTTP/1.1
Database driver version mysqlnd 7.4.33
Database server info
Uptime: 17573024 Threads: 195 Questions: 7311531893 Slow queries: 4203677 Opens: 13346695 Flush tables: 607 Open tables: 4096 Queries per second avg: 416.065
Database server version 5.5.5-10.3.27-MariaDB
Romulus OPRICA
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12942
- Thank you received: 3979
6 months 1 week ago #251267
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic answer code lengths
Please, neither lsq nor lsg exports.
Only lss.
The others are language sensitive. You only can import into a survey with the same base language.
And all surveywide settings are missing.
Help us to help you.
We do not want to have to guess your base language, create a survey to be able to import your lsg.
Joffm
Only lss.
The others are language sensitive. You only can import into a survey with the same base language.
And all surveywide settings are missing.
Help us to help you.
We do not want to have to guess your base language, create a survey to be able to import your lsg.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- romulusoprica
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
6 months 1 week ago #251270
by romulusoprica
Romulus OPRICA
Replied by romulusoprica on topic answer code lengths
Sorry! my mistake! now I added the .lss life
Romulus OPRICA
Attachments:
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12942
- Thank you received: 3979
6 months 1 week ago #251271
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic answer code lengths
You can use a "multiple short text" and enter the script to insert a dropdown
I only included it in question Q00003a.
Then you can have your 8 digit codes in the answer table
Joffm
I only included it in question Q00003a.
Then you can have your 8 digit codes in the answer table
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- romulusoprica
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
6 months 1 week ago #251277
by romulusoprica
Romulus OPRICA
Replied by romulusoprica on topic answer code lengths
Thank you, Joffm, for your help!
I will implement it and do my best to adapt it to my needs.
All the best!
Romulus
I will implement it and do my best to adapt it to my needs.
All the best!
Romulus
Romulus OPRICA
Please Log in to join the conversation.