-
et_jotformDomanda del 5 novembre 2024 alle ore 07:01
I have a series of questions and answers (50), in the form I want to show only a maximum of 5, chosen "randomly" every time I open the form.
The result of the answers given to these questions (random) must be displayed at the end on the thank you page.
The objective is to "REWARD" with a gadget (this form will be used in a fair) who correctly answers all questions and showing the result.
-
Vincenzo Jotform SupportRisposta del 5 novembre 2024 alle ore 07:27
Hi et_jotform,
Show questions randomly and displaying a custom Tank You page based on the question score is easy. Let me show you how:
- Add your 50 questions to the form.
- Next, click on your question and then on the Gear icon that will appear on its right side.
- In the panel that will appear on the right side of the screen, click on the Option tab.
- Enable the Calculation Value option and give the value 1 to the correct answer. Repeat these steps for each question.
- Now, click on the + Add Form Elements button in the top left side of the screen.
- Click on the Widget tab and add the Form Calculation widget to the form.
- Next, in the panel on the right of the screen, click on the Add Field button.
- Add all the question fields and a + symbol in between, then click on Save.
- Now, click on the Gear icon of the Calculation Form widget, then click on the Advanced tab and set the Hide filed option to ON.
- In the orange navigation bar at the top of the page, click on Settings.
- In the column on the left, click on Conditions then select the Change Thank You Page option.
- Set the condition as displayed in the screenshot below, then click on Save:
- Finally, create a condition for each score.
We also have a guide about How to Change the Thank You Page URL Conditionally and a guide about How to Perform Calculations Using a Widget that you can check out. Now, since you want to show only 5 of your 50 questions. You will need to inject a CSS code. Doing that is easy, let me show you how:
- In Form Builder, click on the Form Designer button, on the top right side of the screen.
- Next, click on the Style tab.
- Scroll down to Inject Custom CSS and paste the code provided below:
/*Code to hide all questions - 20816961 */
li.form-line[data-type="control_radio"]:nth-of-type(n){display: none;}
/*Code to show only 5 questions*/
li.form-line[data-type="control_radio"]:nth-of-type(2){display: flex;}
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;}
/*Code Ends Here */
Result:
Here you can test this demo form or clone it to better understand how it was configured.
Give it a try and reach out again if you have any other questions.
-
et_jotformRisposta del 6 novembre 2024 alle ore 02:41
Perfect Vincenzo, this solution is much better and works.
Forgive me if I insist (if you can not .. does nothing), but could I appear in the page of thanks besides the number of correct answers, indicate also which are?
If I’m overdoing it tell me! : )
Thank you so much for all the support!
-
Joseph Jotform SupportRisposta del 6 novembre 2024 alle ore 03:23
Hi et_jotform,
I tested a bit and I found a solution for this. It's a bit long and requires different settings, but your goal could be reached. Here's how to do it:
- In Form Builder, add a Short Text field for each question and hide them. I've called them D2, D3, etc...
- Now, set an Update/Calculate Field condition for each question. You need to set it as below. The conditions should insert the question and/or the answer in the Short Text field only if it's correct.
- Now, go to the Thank You pages, and insert all the IDs of your Short Text fields.
Now, only the correct answer will be transferred to the Short Text fields (D2, D3, etc..) and only these fields that contain values will shown on the Thank You page. Note that since you have multiple, you need to add all the fields into all the Thank You pages. Here's the result:
As you can see, on the Thank You page, I've added D2 and D3, but only the result for D2 is shown on the Thank You page because is the only field that has been filled with a correct answer.
Give it a try and let us know if you need any other help.
- In Form Builder, add a Short Text field for each question and hide them. I've called them D2, D3, etc...