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

TOPIC: multiple choice with comments

multiple choice with comments 4 years 3 weeks ago #88393

  • hwm86
  • hwm86's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
hi,
how i can add a question multiple choice but not all with comments??
this link: grab.by/hwXs describe my question..
The administrator has disabled public write access.

multiple choice with comments 4 years 3 weeks ago #88402

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
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.
The administrator has disabled public write access.

multiple choice with comments 4 years 3 weeks ago #88415

  • hwm86
  • hwm86's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
thanks it's working.
how i can choose a one of the list but isn't the last???
The administrator has disabled public write access.

multiple choice with comments 4 years 3 weeks ago #88440

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
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: 4 years 3 weeks ago by tpartner.
The administrator has disabled public write access.

multiple choice with comments 4 years 3 weeks ago #88461

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9600
  • Thank you received: 1376
  • Karma: 390
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 (use private message).
The administrator has disabled public write access.

multiple choice with comments 4 years 3 weeks ago #88479

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
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.
The administrator has disabled public write access.

multiple choice with comments 4 years 3 weeks ago #88483

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9600
  • Thank you received: 1376
  • Karma: 390
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 (use private message).
The administrator has disabled public write access.
Time to create page: 0.226 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form