Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

how to trigger aRegistersErrors

  • jnhghy
  • jnhghy's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago - 3 years 10 months ago #199913 by jnhghy
how to trigger aRegistersErrors was created by jnhghy
I'm adding a password field to the registrer page, I've added the field in the template and I can read the password entered by the user using:
Code:
Yii::app()->request->getPost( 'survey_password' );
I'm guessing I can do this in beforeRegister function of my custom plugin
what I can't understand is how do I trigger an error to the register form when the password entered is wrong?
I've tried adding:
Code:
$this->aRegisterErrors[] = gT("You must enter the valid survey password. Please try again.");
But this doesn't work for me.
I'm guessing the question is how do I trigger an error and return to the registration form if the password the user adds is wrong?

using LimeSurvey
Version 4.2.3+200511

Thank you.
Last edit: 3 years 10 months ago by jnhghy.
The topic has been locked.
  • jnhghy
  • jnhghy's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #199917 by jnhghy
Replied by jnhghy on topic how to trigger aRegistersErrors
I had a typo in my code:
aRegistersErrors should have been aRegisterErrors :(
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #199931 by DenisChenu
Replied by DenisChenu on topic how to trigger aRegistersErrors
Then it's OK now ?

Else : show all the code …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose