Form Help

TOPIC:

Unique email server validation 5 years 1 month ago #213528

  • Topic Author
  • Vol3n
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 0
Hello, Crosstec!

First I want to say Thank you for developing such great component! I've created a form using BreezingForms and I want to validate that entered email address doesn't exist in my database. Currently I am using this code in my "Begin Submit" piece:
$this->execPieceByName('ff_InitLib');

$email = '\'' . ff_getSubmit('email_test') . '\''; 
$value = ff_selectValue('SELECT * FROM kvkfr_users WHERE email= ' . "$email");

if($value != ''){
die();
}

If I enter an unique email everything works fine, but when the email is found I get a blank white page. What should I use instead of die() to achieve stopping the submitting process without refreshing a page(and maybe displaying a validation box over the email field)?

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

Last edit: Post by Vol3n. Reason: typo

Unique email server validation 5 years 1 month ago #213531

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5957
  • Karma: 119
  • Thanks: 558
Hey there,


I'm sending you an example form of AJAX email validation.
What it does, it check the email element with the DB and if the email is taken the error message is displayed + form is unable to submit.


Let us know if this helped.

Regards,
Mario
Attachments:

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

Unique email server validation 5 years 1 month ago #213537

  • Topic Author
  • Vol3n
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 0
Hmm it works as intended inside your form, but when I try to implement it inside my own form I still get the white page after submit.

Edit: I was getting the white page because I forgot to add the custom validation code to my email field. After adding the validation code I am getting
tests:570 Uncaught ReferenceError: ff_email_test_validation is not defined
error in my browser console.

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

Last edit: Post by Vol3n.

Unique email server validation 5 years 1 month ago #213538

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5957
  • Karma: 119
  • Thanks: 558
Hello,

You can send me your login information to support@crosstec.org so I can take a look at this for you ?
Add a link to this forum topic in the email you send + please note what Form should I check.

I will get back to you ASAP.

Regards,
Mario

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

Unique email server validation 5 years 1 month ago #213539

  • Topic Author
  • Vol3n
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 0
I cannot grant you access to my Joomla since I am using localhost.
I am getting this error after adding your custom validation function to my field:
Uncaught ReferenceError: ff_email_test_validation is not defined

Why its trying to call `ff_email_test_validation` and not `ff_email_validation` (which I included to my scripts)

Edit: I FIXED IT!!! My field was called "email_test" and renaming it to just "email" fixed my problem. Thank you so much for your help!

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

Last edit: Post by Vol3n.

Unique email server validation 5 years 1 month ago #213540

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5957
  • Karma: 119
  • Thanks: 558
Hello,

Great !
You are learning fast :)

If you need anything else, let me know.

Regards,
Mario

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

Last edit: Post by MarioPuco.
  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.051 seconds

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

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!