Upgraded LimeSurvey from 2.00 to 2.06 and having issues with array(numbers) question types that have multiple dropdown columns (see lsq file attached). The dropdowns are now appearing as the value number not as the text (see screenshot attached)
The code used it:
<p>
</p>
<p>
<span style="font-size:14px;"><span style="font-family: arial,helvetica,sans-serif;">Please indicate if and when you have had any of the following medical conditions, operations, illnesses or accidents?</span></span><br />
<script type="text/javascript" charset="utf-8">
Here is some debugging info from the JavaScript console
Uncaught Error: Syntax error, unrecognized expression: [object Object].answer_cell_00SQ001 option[value=1]
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
Hi don't understand how emma script can work with jquery.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
Specifically post
58244
. Later in post
109834
the user reports that code was working, but becomes broken, and on page 3 of the thread tpartner mentions a jquery version update might be the cause.
var thisQuestion = $('#question{QID}');
$(thisQuestion + '.answer_cell_00SQ001 option[value=1]').text('Yes');
Not the same ....
thisQuestion = $('#question{QID}'); make a jquery object, no a string.
To do it with a string var:
Code:
var thisStringQuestion = '#question{QID}';
$(thisStringQuestion + ' .answer_cell_00SQ001 option[value=1]').text('Yes');
(adding a space between id and class)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.