Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Seamlessy combine different multiple choice questions

Seamlessy combine different multiple choice questions 1 year 5 months ago #95498

  • Limer2001
  • Limer2001's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Thank you received: 2
  • Karma: 0
I have a multiple choice question but the display of certain answers depends on token attributes. I don't think it's possible to hide certain answeringoptions based on tokens. So I rather make a multiple choice question with only one answering option. Hide the question text and minimize the bordering so in the end it looks like one multiple choice question.


So i added the following code. But it doesn't work.. And I also don't know how to delete the borders and make the different the multiple choice questions look like one question. Any thoughts on this?
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
 
		var qID = {QID};
 
                $('#question'+qID+' .questiontext {display:none;}
 
}
</script>
The administrator has disabled public write access.

Seamlessy combine different multiple choice questions 1 year 5 months ago #95500

  • ResearchOnBlogs
  • ResearchOnBlogs's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 184
  • Thank you received: 16
  • Karma: 8
Hi,
the first step to make this working is the right syntax :-)

-> $('#question'+qID+' .questiontext').hide();

I'm not sure if the selector is the right one (depends on your theme). You should use the right chained selector.
Further more, if you want to make a decision on a token you must have an "if" in your script.

To manipulate the borders, you have to use the css() command.

Cheers Kai

research on BLOGS - Professional LimeSurvey support
Consultant - Templates - Training - JQuery magic - Support - Coding - Survey creation and more..

Contact
Professional LimeSurvey support
This email address is being protected from spambots. You need JavaScript enabled to view it.
The administrator has disabled public write access.

Seamlessy combine different multiple choice questions 1 year 5 months ago #95502

  • Limer2001
  • Limer2001's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Thank you received: 2
  • Karma: 0
Thanks for your quick response!

I can find this in my customtemplate :

.questiontext {
font-family: arial, verdana, sans-serif;
font-size: 12px;
font-weight: bold;
}

But the code you suggested doesn't work.


Greets,

Michel
The administrator has disabled public write access.

Seamlessy combine different multiple choice questions 1 year 5 months ago #95523

  • ResearchOnBlogs
  • ResearchOnBlogs's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 184
  • Thank you received: 16
  • Karma: 8
Hi michel,

as I said, the selector depends on your theme. Watch out for JS errors and chain step by step (maybe from child to parent) the selectors to have success.

Cheers Kai

research on BLOGS - Professional LimeSurvey support
Consultant - Templates - Training - JQuery magic - Support - Coding - Survey creation and more..

Contact
Professional LimeSurvey support
This email address is being protected from spambots. You need JavaScript enabled to view it.
The administrator has disabled public write access.

Seamlessy combine different multiple choice questions 1 year 5 months ago #95533

  • Limer2001
  • Limer2001's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Thank you received: 2
  • Karma: 0
I have to figure out what chain selection is first I think.

On another note, to get rid of the padding of the answer table I tried adding:

<script type="text/javascript" charset="utf-8"><br />
$(document).ready(function() {
$("answer").css("padding":"0em");
}
</script>



But it didnt work. Any suggestions? td class="answer"
The administrator has disabled public write access.

Seamlessy combine different multiple choice questions 1 year 5 months ago #95545

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
You forgot a dot in front of "answer":
$(".answer").css("padding":"0");
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.

Seamlessy combine different multiple choice questions 1 year 5 months ago #95548

  • Limer2001
  • Limer2001's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Thank you received: 2
  • Karma: 0
Hm still not working. :pinch:
The administrator has disabled public write access.

Seamlessy combine different multiple choice questions 1 year 5 months ago #95549

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
Unfortunately it's difficult to debug without knowing your template structure. Can you activate a sample survey wit those questions for us to see?
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.

Seamlessy combine different multiple choice questions 1 year 5 months ago #95553

  • Limer2001
  • Limer2001's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 18
  • Thank you received: 2
  • Karma: 0
Here you go:
http://ima.nl/onderzoek1/index.php/594693/lang-nl

Thanks for your help so far!
The administrator has disabled public write access.

Seamlessy combine different multiple choice questions 1 year 5 months ago #95559

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
Hm still not working.
You have a <br /> tag inside your script which is breaking it.
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.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.126 seconds
Donation Image