Created
January 18, 2011 07:49
-
-
Save stakes/784109 to your computer and use it in GitHub Desktop.
form validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#volly_form").validate({ | |
errorPlacement: function(error) { | |
$("span.error_container").html("Please double-check that you\'ve filled in both fields and provided a U.S. area code and mobile number."); | |
}, | |
submitHandler: function() { | |
var request_data = { | |
full_name: $('#new_volly_full_name').val(), | |
phone: $('#new_volly_phone').val() | |
}; | |
$.ajax({ | |
type: 'POST', | |
url: 'landing/create_volly', | |
data: request_data, | |
success: function(r){ | |
// $('#new_volly_full_name').val(''); | |
// $('#new_volly_phone').val(''); | |
$('#volly_form_container').empty(); | |
$('#volly_form_container').append("<h3>Your Volly has been created! You will receive a text from Volly.</h3><p class=\"help\">To add people to the conversation, reply with <strong><em>*add Name #</em></strong> (Ex: <em>*add John 4155551212</em>)</p><p class=\"help\">For help, just reply <strong><em>*help</em></strong></p>"); | |
} | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment