Is email field mandatory

Issues related to the Login tools of WYSIWYG Web Builder.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/login_basics.html
http://www.wysiwygwebbuilder.com/login_tools.html

TIP:
A lot of information about the login tools can be found in the help/manual.
Also checkout the demo template that is include with the software.
Post Reply
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Is email field mandatory

Post by alex4orly »

I have a membership form, some members don't have an email address or maybe don't want to provide it.
It seems however that the Form Onsubmit is calling a function to check it.

Looking at the code (inserted by WWB), it seems that if the field is empty, it should just let it go, but it doesn't

function Validateeditprofileform(theForm)
{
var regexp;
regexp = /^([0-9a-z]([-.\w]*[0-9a-z])*@(([0-9a-z])+([-\w]*[0-9a-z])*\.)+[a-z]{2,6})$/i;
if (theForm.email.value.length != 0 && !regexp.test(theForm.email.value))
{
alert("Invalid email address");
theForm.email.focus();
return false;
}
return true;
}
</script>

Why?
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Is email field mandatory

Post by Pablo »

The email address cannot be empty. The length cannot be zero.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Is email field mandatory

Post by alex4orly »

What? Bad idea...
There are club members without an email address
There those who have an address but don't want to publish it.
Who's idea is that?
Why?
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Is email field mandatory

Post by Pablo »

This is by design. Otherwise it options like 'email confirmation' and 'password recovery' would not be possible.
If you need different behavior then you will have to edit the script yourself.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

RESOLVED: Is email field mandatory

Post by alex4orly »

OK, I understand

I arranged with the club secretary to assign a dummy email for those cases.

Now - I tried to implement the Password Recovery, set the object onto a new page by itself, but it fails.
entered my own email address - but it fails.
Is there any documentation on how to implement this?

Cheers
Last edited by alex4orly on Mon Apr 17, 2017 10:05 am, edited 1 time in total.
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Is email field mandatory

Post by Pablo »

What do you mean by 'it fails'?

Please note that it will not work if you do not have an email address associated with the account.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Is email field mandatory

Post by alex4orly »

Fails as in - goes to the Error page
I am using my own email address, which is in the database that I am pointing it to

If you visit that URL and enter : alex4buba@gmail.com you can see what happens.

This object only has an input field and a submit button, there is no field to enter anything else in it

Cheers
Last edited by alex4orly on Mon Apr 17, 2017 10:04 am, edited 1 time in total.
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Is email field mandatory

Post by Pablo »

There are 3 reasons why the error page can be displayed:
- the database is not accessible.
- email address is not in the database
- the account is not active
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Is email field mandatory

Post by alex4orly »

Thanks Pablo

I will check all options
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Is email field mandatory

Post by alex4orly »

OK, I had a typo in the email with one extra letter... It works fine now.
But this leads me to another question - if a member is flagged as Non-Active, can they still login if they know their password?

Otherwise, this is creating a problem for membership renewal...
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Is email field mandatory

Post by Pablo »

can they still login if they know their password?
No, users cannot login if the account is not activate, otherwise this option would not have any use.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Is email field mandatory

Post by alex4orly »

Thanks Pablo,

I will add another field on the records to indicate if they paid membership

Cheers
Post Reply