Skip to content

Instantly share code, notes, and snippets.

@3en
Forked from fdittrich/gist:4739414
Created February 8, 2013 14:46
Show Gist options
  • Save 3en/4739441 to your computer and use it in GitHub Desktop.
Save 3en/4739441 to your computer and use it in GitHub Desktop.
</style>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" charset="UTF-8"></script>
<script type="text/javascript">
setTimeout(function(){
var email_confirmation = '<div style="margin-top: 12px;"><label for="email_confirmation">Email confirmation:<abbr title="Required">*</abbr></label><input id="email_confirmation" name="email_confirmation" required="required" title="Please fill out this field." type="email"><div class="validation error" id="conformation_validation" style="display: block;"></div></div>';
$(".two_across").append(email_confirmation);
$("#ticket_submission form").submit(function(e){
if ($("#email").val() != $("#email_confirmation").val()){
$("#conformation_validation").html("Email and email confirmation must match");
e.preventDefault();
} else {
$("#conformation_validation").html("");
}
})
}, 200);
</script>
<style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment