Customizing Multiple Choice Single Answer Question Layout with JS | XM Community
Question

Customizing Multiple Choice Single Answer Question Layout with JS

  • 19 April 2024
  • 1 reply
  • 22 views

Userlevel 4
Badge +3

How do I adjust a Multiple Choice Single Answer question with Java script to display its choices in a single horizontal row, with the last choice positioned below?

 

These are the choices:

${q://QID97/ChoiceDescription/1}
${q://QID97/ChoiceDescription/4}
${q://QID97/ChoiceDescription/5}
${q://QID97/ChoiceDescription/6}
${q://QID97/ChoiceDescription/7}
${q://QID97/ChoiceDescription/8}
${q://QID97/ChoiceDescription/9}
${q://QID97/ChoiceDescription/10}

I want to make it look like this below:

 

I would appreciate any help!

 

 


1 reply

Userlevel 7
Badge +27

@hachiware10,

I have a function, mcColumns, that can do this. You can contact me by private message if you are interested. You would just call it from your question’s addOnload function like this:

mcColumns(this,{cols:{2:0,7:0},lastSpans:1,textAlign:"center",labelMargin:"auto"});

 

Leave a Reply