❓ General FAQ - How to create Quiz Live Score Form?

  1. Overview
  2. ❓ General FAQ
  3. ❓ General FAQ - How to create Quiz Live Score Form?
  1. Select Survey field from the Advanced fields on the left side of your form.

     2. Click on the setting of the survey field.

     3. Add label and values for the Quiz/If you want to increase the number of Rows and Column click on “Add Another” add your requirement and save.

     4. Now drag and drop Text field from Basic field.

     5. Click on Edit option.

     6. Click on logic, add logic name and set trigger to JavaScript and the below code to that box and save the changes.

  1. (JavaScript code)

var radios = document.querySelectorAll('input[type=radio]');

radios.forEach(function(radioButton){ radioButton.addEventListener('click', function(){ var totalScore = 0; radios.forEach(function(radioButtonClicked){ if(radioButtonClicked.checked) { var radioScore = ((parseInt(radioButtonClicked.value) > 0) ? parseInt(radioButtonClicked.value) : 0); totalScore = totalScore + radioScore; } }); var inputs = document.querySelectorAll('input[type=text]');

	inputs.forEach(function(scoreInput){
		if(scoreInput.id.indexOf("yourScore") > -1)
		{
			scoreInput.value = totalScore;
		}
	});
});

});


Was this article helpful?