multiple choice with comments

More
5 years 1 week ago #88393 by hwm86
hwm86 created the topic: multiple choice with comments
hi,
how i can add a question multiple choice but not all with comments??
this link: grab.by/hwXs describe my question..

Please Log in to join the conversation.

More
5 years 1 week ago #88402 by tpartner
tpartner replied the topic: multiple choice with comments
If you are using LimeSurvey 2.0 and just want to hide the last text input, you can set up your survey to use JavaScript and add the following to the source of the question text:
<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
 
		$('#question'+{self.qid}+' input.text:last').hide();
 
	});
 
</script>

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 1 week ago #88415 by hwm86
hwm86 replied the topic: multiple choice with comments
thanks it's working.
how i can choose a one of the list but isn't the last???

Please Log in to join the conversation.

More
5 years 1 week ago - 5 years 1 week ago #88440 by tpartner
tpartner replied the topic: multiple choice with comments
You can use the position index of the input to hide (note that the indexes start a 0).

So, if you wanted to hide the first input:
$('#question'+{self.qid}+' input.text:eq(0)').hide();

If you wanted to hide the third input:
$('#question'+{self.qid}+' input.text:eq(2)').hide();
More info - api.jquery.com/eq/

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 years 1 week ago by tpartner.

Please Log in to join the conversation.

More
5 years 6 days ago #88461 by DenisChenu
DenisChenu replied the topic: multiple choice with comments
Tony, think it's better to use {QID} than {self.qid} because seem {QID} do the job more easy (for example for array question type) and with less calculation :).

Denis
(and use {SGQ} to)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
5 years 6 days ago #88479 by tpartner
tpartner replied the topic: multiple choice with comments

Tony, think it's better to use {QID} than {self.qid} because seem {QID} do the job more easy (for example for array question type) and with less calculation

I stand corrected.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 6 days ago #88483 by DenisChenu
DenisChenu replied the topic: multiple choice with comments

tpartner wrote:

Tony, think it's better to use {QID} than {self.qid} because seem {QID} do the job more easy (for example for array question type) and with less calculation

I stand corrected.

{QID} and {SGQ} are here in 1.91, but found it mast month .....

:(

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!