Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Column width in an array

Column width in an array 3 years 6 months ago #96438

  • StuTheQ
  • StuTheQ's Avatar
  • Offline
  • Junior Lime
  • Posts: 26
  • Karma: 0
Dear Tony,

Thank you for helping me out yet again.
Since the introduction of Expression Manager, you must leave a space after opening and before closing curly braces or the contents of the brace will be parsed by EM.
I'd come across that while rereading the manual after upgrading to LimeSurvey 2.00+ but, of course, hadn't realised that this was the problem here... :blush:

When I first copied and pasted the corrected script that you gave me, it didn't seem to modify the column widths as specified. I looked at the script carefully again and think that this line
// Align the answer text - feel free to experiment
		$( 'div#question{QID} table.question tbody th' ).css({'text-align':'center'});
doesn't contain the space after and before curly brackets that you referred to. I added the appropriate spaces and the script subsequently worked fine (but I'm not sure if this made a difference or not).

(By the way, I just replaced {QID} with the question ID; is {QID} a specific JavaScript function? :unsure: I Googled it but didn't really find a clear explanation)

I discovered that this script also works well with Array Dual Scales (with 'default' and 'basic' templates, at least), effectively making it possible to adjust the width of the separator column (it just requires a bit of playing around with the column width % until you get the array layout that you want). I'd already looked for this topic and found this post #94288 (Topic: array dual scale: change width of separator), which looked promising, but finally didn't seem to result in a clearcut workaround. I'm going to add a new post to this topic thread later because I'd like to see if there are also other workarounds possible (with CSS, perhaps).


Last Edit: 3 years 6 months ago by StuTheQ.
The administrator has disabled public write access.

Column width in an array 3 years 6 months ago #96459

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6567
  • Thank you received: 1477
  • Karma: 579 {QID} a specific JavaScript function?
{QID} is an Expression Manager variable that returns the question ID -
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
The following user(s) said Thank You: StuTheQ
Time to create page: 0.211 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form