Is it possible to use AJAX (or another approach) to update the answer to a single question on a survey page without submitting the whole page?
If anyone had any example code it would be very much appreciated.
Thanks in advance.
You can use the Custom Scripting ability of SurveyGizmo to update answers to a question. The following example is a script we sometimes use to place the word “None” in questions that have been left unanswered:
This script uses the sgapiIsAnswered funtion to evaluate the answer to the targeted question and then uses the sgapiSetValue function place the desired value. This is just one example of how these and the other sgapi functions can be used.
I am confused about the part of the question where you ask about not having to submit the whole page. We typically place the above script on a hidden page with auto-submit enabled. If you could provide some more details about the problem you are trying to solve, the Community might be able to offer you more detailed guidance.
Great answer Jim! I commonly use that same exact method.