TOPIC:

check email address exists email verification 5 years 6 months ago #169383

  • Topic Author
  • frdt
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
Hi
al is in the title. I try to check if a email adrees already exist and use emaill verification
From the package ajaxemailcheck found on the forum, the check for duplicate address run fine.
Now I try to implement the email verification field.
The field for email verification contain the name email_repeat
In the field for the email, I use the custom script as provided by the package and at the end of the script I copy the function from the default package script for email repeat verification.
The code framework is as follow .. But email repeat verification doesn't work . Is it possible to have two function in the code framework field ?

function ff_email_validation(element, message)
{
if(ff_validemail(element, message) != '') return 'Please enter an email address';
var myreturn = '';
JQuery.ajaxSetup({async:false});
JQuery.post('index.php', { option: 'com_breezingforms', ff_form: ff_processor.form, Itemid: 0, format: 'html', email: element.value }, function(data){ if( data != '1' ){ message == '' ? myreturn = 'Email exists already!' : myreturn = message; } } );
return myreturn;
}
function ff_validemail_repeat(element, message)
{
var check =
/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!check.test(element.value)){
if (message=='') message = element.name+" is no valid email address.\n";
ff_validationFocus(element.name);
return message;
} // if

try{
var repeat = element.name.split("ff_nm_")[1].split("[]")[0];

if(!ff_getElementByName(repeat + '_repeat')){
if (message=='') message = repeat+" has no repeat email field.\n";
ff_validationFocus(element.name);
return message;
} else {
if(ff_getElementByName(repeat + '_repeat').value != element.value){
if (message=='') message = element.name+" and " + repeat + "_repeat do not match.\n";
ff_validationFocus(repeat + '_repeat');
return message;
}
}
}catch(e){
return e.description;
}

return '';
} // ff_validemail
.

Please Log in or Create an account to join the conversation.

check email address exists email verification 5 years 5 months ago #170522

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 674
Hello there,

is it possible to send us your form as a package so we can test that? Follow this steps to create a Form Package: crosstec.org/en/support/online-documenta...ted/94-packages.html

Zip it as (.zip) and attach here.

Kind regards
Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!

Please Log in or Create an account to join the conversation.

check email address exists email verification 5 years 5 months ago #170667

  • Topic Author
  • frdt
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
here are the package
thx

File Attachment:

File Name: taize_tlemcen.zip
File Size:37 KB
Attachments:

Please Log in or Create an account to join the conversation.

check email address exists email verification 5 years 5 months ago #170733

  • pedro81's Avatar
  • pedro81
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 15273
  • Karma: 287
  • Thanks: 1077
Hello!

can you please test this different code for your email validation script?
function ff_email_validation(element, message)
{
    if (ff_getElementByName('email_repeat').value != element.value) {

    ff_validationFocus('email_repeat');
    return message;
}
    if(ff_validemail(element, message) != '') return 'Please enter an email address';
    var myreturn = '';
    JQuery.ajaxSetup({async:false});
    JQuery.post('index.php', { option: 'com_breezingforms', ff_form: ff_processor.form, Itemid: 0, format: 'html', email: element.value }, function(data){ if( data != '1' ){ message == '' ? myreturn = 'Email exists already!' : myreturn = message; } } );
    return myreturn;
    
    if (ff_getElementByName('email_repeat').value == element.value) {
    var check =
    /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    if (!check.test(element.value)){
        if (message=='') message = element.name+" is no valid email address.\n";
        ff_validationFocus(element.name);
        return message;
    } // if
} 
    return '';

}
The following user(s) said Thank You: imanpost

Please Log in or Create an account to join the conversation.

check email address exists email verification 5 years 5 months ago #170801

  • Topic Author
  • frdt
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
I have tested this code and seam to be functional as aspected
the only thinks is that the error message when using a false email confimration adress is "Email already exists!" in red above the form but the cursor stay on the fiel where the error must be corrected
thx

Please Log in or Create an account to join the conversation.

check email address exists email verification 5 years 5 months ago #170807

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 674
Hey there,

can you try to use then "Use balloon errors" option under your form -> Advanced tab -> If no alert on errors

Let us know the result.

Regards
Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.053 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!