Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi
  • Page :
  • 1
  • 2

SUJET : Seamlessy combine different multiple choice questions

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95498

  • Limer2001
  • Portrait de Limer2001
  • Hors ligne
  • Fresh Lemon
  • Messages : 18
  • Remerciements reçus 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>
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95500

  • ResearchOnBlogs
  • Portrait de ResearchOnBlogs
  • Hors ligne
  • Gold Lime
  • Messages : 184
  • Remerciements reçus 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
Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95502

  • Limer2001
  • Portrait de Limer2001
  • Hors ligne
  • Fresh Lemon
  • Messages : 18
  • Remerciements reçus 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
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95523

  • ResearchOnBlogs
  • Portrait de ResearchOnBlogs
  • Hors ligne
  • Gold Lime
  • Messages : 184
  • Remerciements reçus 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
Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95533

  • Limer2001
  • Portrait de Limer2001
  • Hors ligne
  • Fresh Lemon
  • Messages : 18
  • Remerciements reçus 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"
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95545

  • tpartner
  • Portrait de tpartner
  • Hors ligne
  • LimeSurvey Team
  • Messages : 4130
  • Remerciements reçus 763
  • Karma: 347
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.
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95548

  • Limer2001
  • Portrait de Limer2001
  • Hors ligne
  • Fresh Lemon
  • Messages : 18
  • Remerciements reçus 2
  • Karma: 0
Hm still not working. :pinch:
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95549

  • tpartner
  • Portrait de tpartner
  • Hors ligne
  • LimeSurvey Team
  • Messages : 4130
  • Remerciements reçus 763
  • Karma: 347
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.
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95553

  • Limer2001
  • Portrait de Limer2001
  • Hors ligne
  • Fresh Lemon
  • Messages : 18
  • Remerciements reçus 2
  • Karma: 0
Here you go:
http://ima.nl/onderzoek1/index.php/594693/lang-nl

Thanks for your help so far!
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 3 mois #95559

  • tpartner
  • Portrait de tpartner
  • Hors ligne
  • LimeSurvey Team
  • Messages : 4130
  • Remerciements reçus 763
  • Karma: 347
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.
L'administrateur a désactivé l'accès en écriture pour le public.
  • Page :
  • 1
  • 2
Modérateurs: ITEd
Temps de génération de la page : 0.172 secondes
Donation Image