0

I've created a form using BreezingForms(free). Before submitting the form I'm checking if the entered email address is unique using the "Before submit" field in my form settings. The code I am using is :

$this->execPieceByName('ff_InitLib');

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

if($value != ''){
echo "<script> alert('Email is not unique'); </script>";
exit();
}

My code runs as expected and if a duplicate email address is found I am getting the "Email is not unique" alert, but after that my page refreshes and I get a blank white page.I just want to stop the submitting process without refreshing the page(if possible). What should I use instead of exit() to stop the submitting process and stay on the page?

PS. Should I use ff_selectValue() or Joomlas database object to execute my query?

1 Answer 1

0

I've managed to achieve the wanted functionality! Here is how: crosstec forums

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.