-
docente.andyAsked on October 23, 2020 at 3:56 PM
I am trying to make a 100 question quiz , with shows 10 random questions in each submission. I used shuffle to sort the questions in a random way, Now I need that only the 10 first questions appear.
I need to now the CSS syntax and the place where I have to write it.
-
John Support Team LeadReplied on October 23, 2020 at 9:56 PM
Allow me some time to figure out the correct CSS code for this.
I'll get back to you here shortly.
-
John Support Team LeadReplied on October 23, 2020 at 10:31 PM
Thank you for waiting! So here's what I came up with:
1.) Added the Shuffle widget in the Form which shuffles the questions each time the form is loaded
2.) Added the following CSS in the Form. I have added 20 questions (single choice fields) to the Form and each time when the form is loaded I am hiding 10 questions using CSS.
/*hide all questions*/
li.form-line[data-type="control_radio"]:nth-of-type(n){display: none;}
/*show only 10 questions*/
li.form-line[data-type="control_radio"]:nth-of-type(3){display: flex;}
li.form-line[data-type="control_radio"]:nth-of-type(4){display: flex;}
li.form-line[data-type="control_radio"]:nth-of-type(5){display: flex;}
li.form-line[data-type="control_radio"]:nth-of-type(6){display: flex;}
li.form-line[data-type="control_radio"]:nth-of-type(7){display: flex;}
li.form-line[data-type="control_radio"]:nth-of-type(8){display: flex;}
li.form-line[data-type="control_radio"]:nth-of-type(9){display: flex;}
li.form-line[data-type="control_radio"]:nth-of-type(10){display: flex;}
li.form-line[data-type="control_radio"]:nth-of-type(11){display: flex;}
li.form-line[data-type="control_radio"]:nth-of-type(12){display: flex;}
Here's a demo form: https://form.jotform.com/202968576032966
-
docente.andyReplied on October 23, 2020 at 11:07 PM
-
Vanessa_TReplied on October 24, 2020 at 3:38 AM
Will be answering your last concern in a separate ticket linked below: