I was asked for a radiobutton element having "other" as the second last option. For one question I was able to do it by adding script
Code:
function moveUp($item) {
$before = $item.prev();
$item.insertBefore($before);
}
moveUp($('#javatbd177612X75X1738other'));
when I manually look what code the question got. Also I found that {QID} can be used instead of part "1738". But what is the code for all of the "177612X75X1738"-part? I tried {SGQA} and {SGQ} wihtout luck.
Aa-ha! That works also in 4.x. But when I extract the code and put that in the Script-field (below the Help-field), then it does not. So {SGQ} can not be used everywhere. Thanks.
Jmantysalo wrote: So {SGQ} can not be used everywhere.
I think it's an issue and must be reported ...
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.
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.
I do not undestand. Putting just alert({QID}); to script field of a question gives an alert, but nothing like {QCODE}, {Qcode.sgqa} etc. do not work. Can you make an example survey?
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.
There reads "This optional script field will be wrapped, so that the script is correctly executed after the question is on the screen.", so there should be no need to manually write a wrapper.
@tpartner : even with wrapper : "i just want to log something" are not in source code
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.