Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Can I disable some fields within an array

Can I disable some fields within an array 1 Jahr 3 Wochen her #108058

  • SvenF
  • SvenFs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 7
  • Dank erhalten: 1
  • Karma: 1
Hi,

I have to do an array question but not all questions have the same number of results.

It should look like this for example:
1234
question1XXXX
question2XX
question3XXXX

At question2 there should only 1 and 3 being selectable within the array.

Is this possible or must I do separate questions?
Letzte Änderung: 1 Jahr 3 Wochen her von SvenF.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Can I disable some fields within an array 1 Jahr 3 Wochen her #108074

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4849
  • Dank erhalten: 991
  • Karma: 418
Assuming you are using a normal array question...

You can use JavaScript/jQuery to hide some of the radio inputs.

Set up your survey to use JavaScript and add a script like below to the question source. This will hide the sixth and eighth radios in the question.

<script type="text/javascript" charset="utf-8">	
	$(document).ready(function() {
		$('#question{QID} input.radio:eq(5)').hide();
		$('#question{QID} input.radio:eq(7)').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.
Letzte Änderung: 1 Jahr 3 Wochen her von tpartner.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Can I disable some fields within an array 1 Jahr 3 Wochen her #108104

  • SvenF
  • SvenFs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 7
  • Dank erhalten: 1
  • Karma: 1
Works fine - thank you
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.144 Sekunden
Donation Image