Welcome, Guest
Username: Password: Remember me

TOPIC: Single email in input

Single email in input 2 years 6 months ago #78919

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
The administrator has disabled public write access.

Re: Single email in input 2 years 6 months ago #78921

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6429
  • Thank you received: 839
  • Karma: 249
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
The administrator has disabled public write access.

Re: Single email in input 2 years 6 months ago #78927

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?
The administrator has disabled public write access.

Re: Single email in input 2 years 6 months ago #78929

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Single email in input 2 years 6 months ago #78937

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?
The administrator has disabled public write access.

Aw: Re: Single email in input 2 years 6 months ago #78975

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Aw: Re: Single email in input 2 years 6 months ago #78999

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6429
  • Thank you received: 839
  • Karma: 249
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] :)
The administrator has disabled public write access.

Re: Aw: Re: Single email in input 2 years 6 months ago #79004

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Aw: Re: Single email in input 2 years 3 months ago #83090

  • IoSmith
  • IoSmith's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 28
  • Karma: 0
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?
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.123 seconds
Donation Image