Popular Articles

  1. Swap Columns And Rows Of A Grid Question (Vertical Single Choice)

    If you want to display single choice in a Radio Button Grid vertically this JavaScript will do just this but record the data in the same format by row. Check it out in an example survey ! OR Add this survey to your US account or your EU acc...
  2. sgapiSetQuestionProperty(%%questionID, %%property, %%value)

    This function sets the given property to the given value for the given question. Possible Properties Values exclude_number boolean labels_right boolean orientation...
  3. sgapiPrint_R(%%mixed)

    This is equivalent to the print_r function in PHP. Given any variable sgapiPrint_R will display information about a variable in a way that is readable by humans. Use with %%output to output to the page. Very useful when looking at arrays of data o...
  4. Find/Replace in Code Editor

    Throughout our application we use the CodeMirror text editor for editing code. Below are keyboard functions for find and replace within the CodeMirror editor in our application. Start searching Ctrl-F / Cmd-F Find next Ctrl-G / C...
  5. sgapiGetTitle(%%questionID,%%language)

    This function returns the title of a question. Using the %%language parameter you can return the title in the given language. The values are the languages available in the translation menu. %%language must be title case. Example ...
  6. Calculate Age From Birthday

    This JavaScript will perform age verification based on the date of birth entered in an open-text field. The qualifying age can be set in the script (18 years old, 21 years old, etc.) and if the user is not old enough, they will be disqualified. If t...
  7. Setting Continuous Sum Max Total Value Dynamically

    The Continuous Sum question is a very popular question, particularly with our market research users. Often survey designers are looking to make sure that the continuous sum total matches another value that the respondent entered. In this tutorial, w...
  8. sgapiSetTitle(%%questionID,%%value,%%language)

    This function sets the title of a question. HTML is allowed. The %%language parameter is a required parameter. The values are the languages available in the translation menu. Languages must be title case, for example, %%language = "Spanish". ...
  9. sgapiGetQuestionResponseCount

    This is a realtime reporting function. You can query the total response count for a question using the %%questionID parameter. Or, by passing an option sku in %%osku, you can return the response count for a particular answer option. You can also fil...
  10. Script to Display Follow Up Items for Highest Ranked Max Diff Attributes

    In this example we cover a script to conditionally show text elements based on the attributes that are rated highest in a Max Diff question. We'll be using the following SurveyGizmo features in this example: Max Diff  Question ...