Syspons SurveyXact Library Documentation - v1.0.7
    Preparing search index...

    Function init

    • Initializes the history function. Do this once per survey page on which you want to display a history.

      To pre-populate some parameters you can use the following snippet and exchange history_id, credentials and optionally reference_ids.

      "<script language='javascript' type='text/javascript'>$(document).ready(function() { ssxlib.history.init('" + string(value([respondent/respondentid])) + "', 'history_id', { user: 'encrypted_username', password: 'encrypted_password' }, '" + string(value([respondent/survey])) + "', ['reference_ids']);})</script>"
      

      Parameters

      • respondent_id: string

        The current respondents ID. Can be obtained from SurveyXact via string(value([respondent/respondentid]))

      • history_id: string

        The string ID you gave the your timestamp variable.

      • credentials: Credentials

        An object containing the encrypted credentials for a SX user with access rights for the survey and for the folder the survey is saved in. Obtain the encrypted credentials from jan.bladt@syspons.com.

      • survey_id: string

        The survey ID. Can be obtained from SurveyXact via string(value([respondent/survey])).

      • Optionalreference_ids: [string]

        An array of string IDs you want to logically separate from each other. E.g. create a background variable 'user' and distribute different values for users who should only see their answers.

      Returns void