Skip to content

Instantly share code, notes, and snippets.

@fdittrich
Created February 8, 2013 14:41
Show Gist options
  • Save fdittrich/4739414 to your computer and use it in GitHub Desktop.
Save fdittrich/4739414 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>
@3en
Copy link

3en commented Feb 8, 2013

Feedback Tab Hack to insert another text field "email confirmation" which double checks the email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment