0
$("#contact-form").validate({
    rules: {
                                contact_name: {
                                    required : true,
                                    email: {required: true, email: true }
                                    },
                                contact_company: "required",

                                },

                            messages:{
                                "contact_name":"",
                                "contact_company":""}
});

How to add a messagebox to jsvalidation that says "you sent message"

2
Contributors
1
Reply
7
Views
4 Years
Discussion Span
Last Post by LastMitch
0

How to add a messagebox to jsvalidation that says "you sent message"

You can try this:

// Validate the form 
$("#contact-form").validate({

// Custom validation messages
messages: { 
contact_name: "Please enter your full name.", 
contact_company: "Please enter you company name.", 
contact_message: "You sent message."},

submitHandler: function(form){

//Get the data from the form fields and format correctly
var name = $("#contact-form #contact_name").val();
var email= $("#contact-form #contact_company").val();
var message = $("#contact-form #contact_message").val();

document.forms["contact-form"].submit();
}
});
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.