Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA: Seamlessy combine different multiple choice questions

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95498

  • Limer2001
  • Limer2001s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 18
  • Dank erhalten: 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>
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95500

  • ResearchOnBlogs
  • ResearchOnBlogss Avatar
  • OFFLINE
  • Gold Lime
  • Beiträge: 184
  • Dank erhalten: 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
Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95502

  • Limer2001
  • Limer2001s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 18
  • Dank erhalten: 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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95523

  • ResearchOnBlogs
  • ResearchOnBlogss Avatar
  • OFFLINE
  • Gold Lime
  • Beiträge: 184
  • Dank erhalten: 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
Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95533

  • Limer2001
  • Limer2001s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 18
  • Dank erhalten: 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"
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95545

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 3813
  • Dank erhalten: 683
  • Karma: 328
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95548

  • Limer2001
  • Limer2001s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 18
  • Dank erhalten: 2
  • Karma: 0
Hm still not working. :pinch:
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95549

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 3813
  • Dank erhalten: 683
  • Karma: 328
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95553

  • Limer2001
  • Limer2001s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 18
  • Dank erhalten: 2
  • Karma: 0
Here you go:
http://ima.nl/onderzoek1/index.php/594693/lang-nl

Thanks for your help so far!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95559

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 3813
  • Dank erhalten: 683
  • Karma: 328
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
  • 2
Moderatoren: ITEd
Ladezeit der Seite: 0.164 Sekunden
Donation Image