Welcome to the LimeSurvey Community Forum

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

Limit on lines of code for questions

  • bpresentati
  • bpresentati's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #221137 by bpresentati
Limit on lines of code for questions was created by bpresentati
Hello, 

I'm using a relatively complicated html/javascript code in some of my questions, and it appears that there is a limit on the number of lines of code that are possible. Is there any way to increase this limit? 
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 6 months ago #221138 by Joffm
Replied by Joffm on topic Limit on lines of code for questions
In the database this field is of type "text".
 

The maximum amount of data that can be stored for each data type is approximately:
TEXT 65,535 bytes ~64kb

But consider: Unicode characters may use more than one byte.
And this, too

The maximum size of a 

Code:
BLOB
 or 
Code:
TEXT
 object is determined by its type, but the largest value you actually can transmit between the client and server is determined by the amount of available memory and the size of the communications buffers. You can change the message buffer size by changing the value of the 
Code:
max_allowed_packet
 variable, but you must do so for both the server and your client program.


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 6 months ago - 2 years 6 months ago #221142 by tpartner
Replied by tpartner on topic Limit on lines of code for questions
Place the code in a function in your custom.js file and call it from the question.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 2 years 6 months ago by tpartner.
The topic has been locked.
  • bpresentati
  • bpresentati's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #221143 by bpresentati
Replied by bpresentati on topic Limit on lines of code for questions
@Joffm: thank you. That's what I suspected/feared.
@tpartner: that's a great idea! I was thinking about doing something like that, but it's good to hear from the expert that it's possible.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 6 months ago - 2 years 6 months ago #221152 by DenisChenu
Replied by DenisChenu on topic Limit on lines of code for questions
Else : on mysql : you can set this column as LONGTEXT .
It's OK for PHP code, and you have a lot more space.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 2 years 6 months ago by DenisChenu.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose