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

  1. Select Survey field from the Advanced fields on the left side of your form.

Image not available

     2. Click on the setting of the survey field.

Image not available

     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.

Image not available

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

Image not available

     5. Click on Edit option.

Image not available

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

Image not available

  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?