Actions

SaveSurveyForm

From LimeSurvey Manual

 Hint: This features is available starting in version 5.3.8


Usage

This event happen when save form is shown to user, and when data sent to user are validated before showing it again)

Input

  • surveyid : the related survey id
  • state : Sate of the form : show at first or validate when validate user entered values.
  • aSaveErrors : array of string for errors, if empty : no errors.
  • saveData : associative array the current saved data:
    • identifier : the identifier of the saved data (username)
    • email : email used for the saved data
    • clearpassword : string to set as access_code before crypt (password)
    • clearpasswordconfirm : string for comparaison

Possible output

  • aSaveErrors : can be updated by plugin, if not empty : form is shown with error. By default core control (in this order):
    • empty identifier
    • empty clearpassword
    • if clearpassword and clearpasswordconfirm match
    • identifier must not contain identifier /, & and \\
    • unicity of identifier
    • validity of captcha (if enable)
  • saveData you can update data before save it , only identifier, email and clearpassword is used in model.

Sample plugins