Popular Articles

  1. sgapiExplode(%%delimiter, %%string, %%limit)

    This is equivalent to the explode function in PHP. Given a %%string it will create an array breaking the string up by %%delimiter. Limit is optional. If set, the returned array will only contain up to %%limit elements. To see an example o...
  2. sgapiArray_Pop(%%array)

    This is the equivalent of the array_pop function in PHP. Given an array this function will return the last element of the array and remove that element from the array itself. To see an example or learn more other PHP functions and PHP progr...
  3. PDF Functions

    The PDF functions allow you to build a PDF within a response to be sent via the sgapiEmailSend function. PHP PDF Creation - Use these functions to dynamically create a PDF document using PHP. PDFs can be output and attached to an email ...
  4. sgapiAddContactToInvite(%%linkID, %%email, %%fields, %%customfields, %dupsok)

    This function adds a contact with the list of given fields to the given invite. %%linkID* is the Invite ID of your email campaign %%email * is the email address of the contact you'd like to add %%fields is an array of the conta...
  5. sgapiNewPDF(%%pdf, %%paper, %%orientation)

    This function creates a PDF object that you can store, build and output and send via the sgapiEmailSend function.  Parameters %%pdf - The title of the PDF you are creating. %%paper - The paper size, e.g. 'letter', 'legal', 'a4' (%%paper is...
  6. sgapiQuestionsAnsweredOnPage(%%pageID,%%options)

    This function returns a count of answered questions on a given page. Use %%options to specify question type. %%page should be the page sku/ID (not the page number). Possible Values for %%options* RANK (Evaluates Drag & Drop and Table Rank q...
  7. 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...
  8. sgapiGetQuestionProperty(%%questionID, %%property)

    This function returns the given property to the given question. Possible Properties Return Values exclude_number boolean labels_right boolean orientation VER...
  9. sgapiAllQuestionsOfType(%%type,%%pageID)

    This function returns an array of all the questions (of a particular type) on a particular page. Possible values for %%type: "RANK", "RADIO", "CHECKBOX", "TEXTBOX", "MULTI_TEXTBOX", "TABLE", "GROUP", "MENU", "LIST", "CONT_SUM" %%pageID is ...
  10. sgapiPageMap()

    This function returns an array of page skus keyed to an array of id => type, as in element type, for all elements in the entire survey, regardless of where in the survey it is used. Return Type Survey Element Type ...