Welcome, Guest
Username: Password: Remember me

TOPIC: multiple choice with comments

multiple choice with comments 1 year 11 months 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.

Re: multiple choice with comments 1 year 11 months ago #88402

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4280
  • Thank you received: 807
  • Karma: 370
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: multiple choice with comments 1 year 11 months 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.

Re: multiple choice with comments 1 year 11 months ago #88440

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4280
  • Thank you received: 807
  • Karma: 370
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 1 year 11 months ago by tpartner.
The administrator has disabled public write access.

Re: multiple choice with comments 1 year 11 months ago #88461

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6451
  • Thank you received: 844
  • Karma: 249
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)
The administrator has disabled public write access.

Re: multiple choice with comments 1 year 11 months ago #88479

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4280
  • Thank you received: 807
  • Karma: 370
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: multiple choice with comments 1 year 11 months ago #88483

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6451
  • Thank you received: 844
  • Karma: 249
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 .....

:(
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.120 seconds
Donation Image