Single email in input

More
5 years 6 months ago #78919 by ernestocivello
ernestocivello created the topic: Single email in input
Hi, my survey requires email insertion in a field.
I want that two users cannot insert same email but i can't find any way to run this validation.
In alternative I think to solve this problem with email registration but I don't want send any email in my public survey.

So, in other words, how can design a simple PUBLIC survey with these two question:
1 - insert your email (valid email, UNIQUE)
2 - are you agree with... (boolean response)

Thank you

Please Log in to join the conversation.

More
5 years 6 months ago #78921 by DenisChenu
DenisChenu replied the topic: Single email in input

ernestocivello wrote: 1 - insert your email (valid email, UNIQUE)

For email validation, easy way:
docs.limesurvey.org/Using+regular+expressions#Email_Validation :

But test only if email exist but only if email are valid.

But if you want more control, for example UNIQUE, need ajax validation.

You can test if MX exist too in ajax : php.net/manual/function.checkdnsrr.php

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
5 years 6 months ago #78927 by ernestocivello
ernestocivello replied the topic: Single email in input
Thank you for your answer but I don' understand very well

If I run an ajax validation to check UNIQUE email, which service I have to call?
Do I have implement a service that accesses to limesurvey db or this service is just included in limesurvey?

Please Log in to join the conversation.

More
5 years 6 months ago #78929 by Mazi
Mazi replied the topic: Single email in input
Currently there is no inbuild feature for checking answers at the DB and comparing with current survey values.
The only solution is to code an Ajax call which calls a PHP script to query the DB and check if the email entered already exists.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 6 months ago #78937 by ernestocivello
ernestocivello replied the topic: Single email in input
Ok!
Last question: can i enable public registration and disable registration email?
In this way I can require email (unique) insertion at the first step...
What do you think about?

Please Log in to join the conversation.

More
5 years 6 months ago #78975 by Mazi
Mazi replied the topic: Aw: Re: Single email in input
After public registration the user is sent an email with the token assogned to him so it might not be a good idea to remove the registration email.
The confirmation email at the ene of a survey is not sent if the email text and subject is empty. Maybe that works as well.
But I think there is no check for dplicate email during registration.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 6 months ago #78999 by DenisChenu
DenisChenu replied the topic: Aw: Re: Single email in input

Mazi wrote: But I think there is no check for dplicate email during registration.

LS check for duplicate email during registration:

[code type=php-brief] $register_errormsg=$clang->gT("The email you used has already been registered.");[/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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
5 years 6 months ago #79004 by Mazi
Mazi replied the topic: Aw: Re: Single email in input

DenisChenu wrote:

Mazi wrote: But I think there is no check for dplicate email during registration.

LS check for duplicate email during registration:

[code type=php-brief] $register_errormsg=$clang->gT("The email you used has already been registered.");[/code] :)

Thanks for the information, Denis. Then this should work well.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 3 months ago #83090 by IoSmith
IoSmith replied the topic: Aw: Re: Single email in input

DenisChenu wrote:

Mazi wrote: But I think there is no check for dplicate email during registration.

LS check for duplicate email during registration:

[code type=php-brief] $register_errormsg=$clang->gT("The email you used has already been registered.");[/code] :)


Hi Denis.
Maybe i could use this for my problem ( www.limesurvey.org/en/forum/can-i-do-thi...-with-the-same-email )? What do you think? Would i have problems if i comment code lines out in register.php? Which lines?

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now