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
4 years 6 months ago - 4 years 6 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: 4 years 6 months ago by jnhghy.
The topic has been locked.
  • jnhghy
  • jnhghy's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 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 & Official Partner
  • LimeSurvey Community Team & Official Partner
More
4 years 6 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose