Updated Articles

  1. sgapiPDFOutput(%%pdf)

    This function returns the output of your pdf. For more info on PHP PDF Creation visit: https://github.com/rospdf/pdf-php/blob/master/readme.pdf Example The below script creates and builds a PDF object, outputs it and adds it as an attachment...
  2. sgapiGetValue(%%questionID)

    This function returns the value (reporting value) of an answered question (or null, if not answered). For single answer questions, a single value is returned. Multi-answer questions return an array. Grid and custom group questions return a multidime...
  3. 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...
  4. 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...
  5. 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...
  6. Disable Radio Button Once Option is Selected

    While we do have a built-in feature that will hide a question once it is answered . This JavaScript will allow you to still display the question but not allow changes. It works with Radio Button questions and Radio Button Grids .   Check it out...
  7. sgapiHtmlentities(%%html)

    This is equivalent to the htmlentities function in PHP. The function converts all applicable characters to HTML entities. To see an example or learn more other PHP functions and PHP programming, visit PHP Documentation . ...
  8. sgapiURLDecode(%%string)

    This is equivalent to the urldecode function in PHP. This function can be used to read information that is URL encoded. Example A good example would be reading information from a URL variable. //retrieve the string describing a...
  9. sgapiURLEncode(%%url)

    This is equivalent to the urlencode function in PHP. Given %%url this function will URL encode it making your links safe. To see an example or learn more other PHP functions and PHP programming, visit PHP Documentation . ...
  10. sgapiTrimStr(%%string)

    This is equivalent to the chop function in PHP. This will remove the trailing whitespace. Example The below example will output the following: Text to Left all this whitespaceText to Right. %% string = ' all this whitespace ...