Quote Originally Posted by MagicMan View Post
I tried using this with the Create Account Page and after customer filled out form and hit submit, it just redirected to a blank page and no customer was created.

I have removed it to see if I could figure out what is wrong.
Hi hope you don't mind a newbie trying to help, but I think I had the same issue till I read all the posts and pulled together a fix from everything.
Might even get my knuckles rapped for jumping in but here we go.

[legend] * * change to your file/folder name

modules/pages/*pagename*/header_php.php

after the line (around line 18):

$enquiry = zen_db_prepare_input(strip_tags($_POST['enquiry']));

add this:

$leaveblank = zen_db_prepare_input(strip_tags($_POST["leaveblank"]));

edit the line: (around line 23)

as follows:

if ($zc_validate_email and !empty($enquiry) and !empty($name) and !empty($subject) and empty($leaveblank)) {

Alternatively edit the line: (around line 23)

if ($zc_validate_email and !empty($name)and empty($leaveblank)) {

add this line: (around line 80)

//add this test that kills the page if the field was not empty.
if (empty($enquiry)) {
$messageStack->add('contact', ENTRY_EMAIL_CONTENT_CHECK_ERROR);
}

if (!empty($leaveblank)) {
exit;
}

Alternatively add this:

//add this test that kills the page if the field was not empty.
if (!empty($leaveblank)) {
zen_redirect(zen_href_link(FILENAME_CONTACT_US, 'action=success'));
}

I may have it completely wrong, and if so (@those with knowledge please be gentle)

1. the origional mod did send a bot to an empty page.
2. I think it was doing the error action on the empty field and not if the field was not empty.

I have implement the above mods to my contact us page and it seem to be working. you can check it out at AML Camdles

Hope I've been of help Billy.