Check out the LimeSurvey source code on GitHub!

dynaminc SGQA

More
5 years 11 months ago - 5 years 11 months ago #56216 by sig_block
Hi,
i need to make a script available to an entire groups of questions. This script works on answer ids (i.e on their SGQA codes).

is there a way to refer to the actual SGQA,
for having something like (e.g. for the answer 11448X7X1423sq26):
var this.QQ = ??? 
 
if ($( '#answer11448X7X'+this.QQ+'sq26' ).attr('checked') == false ) {
	$( '#question'+this.QQ+' li:eq(62)' ).hide();
	$( '#answer11448X7X'+this.GQ+'a29' ).attr('checked', false);
}

thanks

gL
Last Edit: 5 years 11 months ago by sig_block. Reason: wrong code

Please Log in to join the conversation.

More
5 years 11 months ago - 5 years 11 months ago #56221 by sig_block
I found this solution
it dipends on the question-type.
e.g. for the multiple option question:
 
var QQ=$('.multiple-opt').attr('id').replace(/question/,'');
 
That is: i just take the id (removing the word "question") of the div with the class ".multiple-opt".
Anyone has a better solution?
Last Edit: 5 years 11 months ago by sig_block.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form