close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Confirm Email Field on Form

Thread began 8/15/2012 10:47 pm by elevy388997 | Last modified 8/28/2015 1:47 pm by Ray Borduin | 943 views | 8 replies |

elevy388997Beta Tester

Confirm Email Field on Form

I know I have seen it before but I absolutely could not find the thread through the search.

I just want to have people type their email address in twice to verify there are no typos. So Email: and then Confirm Email: which will check to see if the spelling is the same.

If you could link me to the right direction that would be awesome. Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

after the page is created, add a new form element for confirming the email address, then open the server behaviors panel and double click the server validation server behavior to edit it.

select the Like Entry validation type, then click the lightning bolt next to server variable to select the Email form element binding.

When you click the plus button to add the validation, you will be prompted to select the comparison, select the binding for the new element that was added.

Sign in to reply to this post

DeanCollins

Okay, I created a form with email and confirm-email fields. Made both required:

$WAFV_Errors .= WAValidateEM((isset($_POST["email_address"])?$_POST["email_address"]:"") . "",true,3);
$WAFV_Errors .= WAValidateRQ((isset($_POST["email_confirm"])?$_POST["email_confirm"]:"") . "",true,4);

Then I created a validation to make them match (I think):

$WAFV_Errors .= WAValidateLE(((isset($_POST["email_address"]))?$_POST["email_address"]:"") . "",((isset($_POST["email_confirm"]))?$_POST["email_confirm"]:"") . "",true,12);

And under the confirm email field there's the original show-if validation:

<?php
if (ValidatedField('contactpublicrecords','contactpublicrecords')) {
if ((strpos((",".ValidatedField("contactpublicrecords","contactpublicrecords").","), "," . "4" . ",") !== false || "4" == "")) {
if (!(false)) {
?>
<span class="serverInvalidState" id="email_confirm_ServerError">Please retype your email address</span>
<?php //WAFV_Conditional contact_public_records.php contactpublicrecords(4:)
}
}
}?>

If I delete the confirm-email required line (#4) and, in the show-if validation code change 4 to 12, will that make it work? I mean, it works now but if the email addresses don't match, there's no pop-up -- the form page just reappears with no error message.

I've attached the page (you just looked at it for another thread).

Sign in to reply to this post

Ray BorduinWebAssist

Yes, just updating the 4 to 12 everywhere it occurs in that code should work.

Sign in to reply to this post

DeanCollins

Almost, but I'm still getting something wrong. If the two fields match, I go to the thank-you page and get the contents in an email. But if they don't match, there's no error and the page just reloads with all of the fields filled in. I'm attaching the latest page. Thanks! I know these little things must make you want to tear your hair out on some days.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like it should work. If you give me FTP access and a url to view the page I can debug it directly.

Sign in to reply to this post

DeanCollins

Here they are.

Also, it's okay to test the form. The mail goes only to me at this point.

Sign in to reply to this post

Ray BorduinWebAssist

You had repeated jquery htm5 validation code that was causing issues. I moved it lower on the page and removed the repeated code and it appears to be working properly now.

Sign in to reply to this post

DeanCollins

Thank you!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...