New Articles

  1. sgapiGetRespondentSessionID()

    This function returns the session ID for the current response. Session ID is a unique, randomly generated string used to identify the respondent's survey session. Example %%session = sgapiGetRespondentSessionID(); %%output .= %%ses...
  2. sgapiRandomizeTable(%%questionID)

    This function shuffles the rows of the given table. Example In the below example we randomize the rows of table question ID 2. sgapiRandomizeTable(2);
  3. sgapiListReplace(%%surveyID, %%reponseID, %%array)

    This function replaces the given response for the given survey with the array items. This is equivalent to updating a SurveyResponse object via the RestAPI. To learn more visit the SurveyResponse API Object documentation. Example In t...
  4. sgapiListRemove(%%surveyID, %%responseID)

    This function removes the given response from the given survey. This is equivalent to deleting a SurveyResponse object via the RestAPI. To learn more visit the SurveyResponse API Object documentation. Example The below example removes...
  5. sgapiListAdd(%%surveyID, %%item)

    This function posts a response to the given survey using the array of items. This is equivalent to creating a SurveyResponse object via the RestAPI. To learn more visit the SurveyResponse API Object documentation. Example The below example scri...
  6. 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 -...
  7. sgapiReferrer()

    This function returns the URL of the webpage that linked to the survey for the given respondent. Example In the below example survey we output the Referrer to the page which is this tutorial! Check it out in an Example Survey %%output .= sgap...
  8. sgapiDate(%%format,%%time)

    This is equivalent to the date function in PHP. This function converts %%time, a Unix timestamp, into a human readable date and time. %%time is optional and defaults to the current time. Check out the PHP documenation for this function to lea...
  9. sgapiStrtotime(%%string,%%time)

    This is equivalent to the strtotime function in PHP. This function takes %%string and converts it to a Unix timestamp. If the optional %%time is given it will convert it relative to %%time. See an example in our Age Verification by Birthd...
  10. sgapiIConv(%%in_charset, %%out_carset, %%string)

    This is equivalent to the iconv function in PHP. Performs a character set conversion on %%string from %%in_charset to %%out_charset. To see an example or learn more other PHP functions and PHP programming, visit PHP Documentation . ...