Popular Articles

  1. How To Find Element IDs to Use With JavaScript

    If you're using JavaScript you'll eventually need to find out where a element ID is. This tutorial will walk you through locating your element IDs.  Browsers: Each browser will have a different way to find your element ID. In ...
  2. Working Examples of JavaScript

    JavaScript Working Example documentation content has moved to our new custom scripting resource site: luascript.surveygizmo.com/help
  3. sgapiGetValueLabel(%%questionID,%%language)

    This function returns the answer option title of the selected answer option (or null, if not answered). For single-select questions, a single value is returned. Multi-select and matrix questions will return an array. Using the %%language paramet...
  4. sgapiJumpToPage(%%pageID)

    This function jumps the respondent to the specified page ID. Example In this example, respondents who answer question ID 2 "No" are jumped to page ID 4. Check it out in an Example Survey %%children = sgapiGetValu...
  5. SurveyGizmo Functions

    These functions were built to allow you to interact with your surveys to build the exact functionality you want. Question Functions These are functions that allow you to evaluate and affect survey questions. For example, sgapiGetVa...
  6. How To Find Question, Page, Option ID Numbers To Use In Custom Scripts

    If you are utilizing Custom Scripts in your surveys, you will likely have a need for referencing answer options, questions, or survey pages. Each of these items have their own unique identifiers that can be referenced in your scripts. Read on to l...
  7. sgapiGetQuestionOptions(%%questionID, %%type)

    This function returns an array of options for the given question. %%type can be "Reporting" or "Title" (default for type is "Title"). Example The below script outputs both the answer option titles and repor...
  8. sgapiGetQuestionOptionSelected(%%questionID)

    This function returns the option sku for the selected answer. For multi-select questions will return an array. Example In this example, we return the option sku of a single-select question (ID 7) and a multiple-select question using sgapiGetQuest...
  9. Piping: Radio Button Grid Into Checkbox Question

    In this example is a script which queries for which rows in a Radio Button Grid respondents answered an option between the values of 6 and 10 and then filter the list of options in the subsequent Checkbox question accordingly. For this to work the t...
  10. sgapiList(%%surveyID, %%page, %%countperpage, %%filterstring)

    This function returns the list of responses for the given survey. This is equivalent to a get list on the SurveyResponse object via the RestAPI. To learn more visit the SurveyResponse API Object documentation. Parameters %%page -...