- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
how to trigger aRegistersErrors
- jnhghy
- Topic Author
- Offline
- New Member
Less
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:
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:
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.
Code:
Yii::app()->request->getPost( 'survey_password' );
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.");
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
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
aRegistersErrors should have been aRegisterErrors
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
3 years 10 months ago #199931
by DenisChenu
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.
Replied by DenisChenu on topic how to trigger aRegistersErrors
Then it's OK now ?
Else : show all the code …
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.