Popular Articles

  1. Piping From Two Questions Into One

    Sometimes it is appropriate to ask two separate questions on slightly different themes, but ask a follow-up question about what the respondents select as a combination.  In this case, we set up a script which filters the answer options displayed in ...
  2. Piping: Radio Button Grid to Radio Button Grid

    In this example, we are going to only show the rows in the target radio button grid questions for which any of a specified set of column answers were checked in the source Radio Button Grid. For this to work, the target Grid question must be se...
  3. sgapiHideQuestion(%%questionID,true/false)

    This function hides when set to true and shows a question when set to false. Example In the below script we hide question ID 3 by default. Then if question 1 is "yes" it is shown by setting sgapiHideQuestion to false. sgapiHideQu...
  4. Disqualify Based on Previously Collected Data

    Looking for a way to disqualify a respondent based on an email address or customer ID# that has already been entered in your survey? Not a problem! This script will check your survey's database for a particular question to see if the same data has b...
  5. sgapiArrayGet(%%array,%%index)

    Returns the value of the given index in an array. Example In this example we pull the value for a particular row (10010) from a list of textboxes where we are collecting favorite movie by genre. %%movies = sgapiGetValue(20); %%f...
  6. Record Reason for Disqualification

    When using disqualification in a survey often there is more than one point at which a response can be disqualified. Unfortunately, there is not a way, within our core application, to easily evaluate how frequently each disqualification point is reac...
  7. Piping From a Checkbox Into a Grid Question

    In this scenario, we are going to set up a custom script to filter the grid rows displayed in a target question based on any corresponding options selected in the source checkbox question. Normally, it would be fine to use standard piping, but here...
  8. sgapiIsAnswered(%%questionID)

    This function returns Boolean true if the given question has been answered. Examples In this example, we return whether question ID 2 is answered. %%output .= sgapiIsAnswered(2) Output would be 1 if answered and null if unanswere...
  9. Using CSS Classes in JavaScript

    When you are writing Javascript in SurveyGizmo and need to interact with the DOM, the most straightforward option is often to use the IDs of the specific elements that you are interacting with.  For example, here is the HTML for an individual textb...
  10. Piping: Checkbox Grid to Radio Button Grid

    In this example we are going to only show the rows in the target radio button grid questions for which any of a specified set of column answers were checked in the source grid. For this to work, the target grid question must be setup with row t...