Using AJAX within Survey Gizmo

0

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.

Jacob H (Moderator) answered
    0

    Great answer Jim! I commonly use that same exact method.

    Jacob H (Moderator) answered
      1

      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:

      if (sgapiIsAnswered(59)==”)
      {
      sgapiSetValue(59,”None”);
      }

      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.

       

      Jim W (Moderator) answered
        ×

        Login

        Question stats

        • Active
        • Views1208 times
        • Answers2 answers
        • Followers1 follower