New Articles

  1. sgapiStrToLower(%%string)

    This is equivalent to the strtolower function in PHP. This function returns the given string in all lower case using the PHP function strtolower. To see an example or learn more other PHP functions and PHP programming, visit PHP Documentati...
  2. sgapiNumberFormat(%%value, %%decimals, %%dec_point, %%thousands_sep)

    This is equivalent to the number_format function in PHP. This function can be used to format number entries in your survey. Parameters %%value - The number you are formatting. %%decimals - The number of decimals (default is...
  3. sgapiParseURL(%%url, %%component)

    This is equivalent to the parse_url function in PHP. %%component is optional. %%component - Specify one of PHP_URL_SCHEME, PHP_URL_HOST, PHP_URL_PORT, PHP_URL_USER, PHP_URL_PASS, PHP_URL_PATH, PHP_URL_QUERY or PHP_URL_FRAGMENT to retrieve jus...
  4. 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...
  5. sgapiDisqualify(%%message)

    This function disqualifies the user and ends the survey. %%message will display your customized message to the respondent. Example In this example, if the answer to question ID 2 is "no" and there are fewer than 3 answered questions on page ID 1,...
  6. 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 = sgapiGetValue(2); i...
  7. 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...
  8. sgapiArraySet(%%array,%%index,%%string)

    This function sets the value of an item within an array. Example In the below example we change the value of textbox 10003 from a list of textboxes to 'Amelie'. %%movies = sgapiGetValue(5); %%foreign = 10003; %%value = 'Amelie'; sgapiArrayS...
  9. sgapiCount(%%array)

    This is the equivalent of the count function in PHP. It returns the number of elements in an array. To see an example or learn more other PHP functions and PHP programming visit PHP Documentation . ...
  10. sgapiCSVSplit(%%string)

    Splits the given comma-separated string into an array. Example In the below example we create an array from a comma-separated list. %%string = apples, oranges, bananas, pears, grapes, papaya, kiwi; %%output = sgapiCSVSplit(%%string); The outpu...