How to make the contact form optional?

How to make the contact form field is optional "message"?
Or at least tell me which file to dig?

Here is a link to the pattern!
pokojan.my.id/demo/diamond/agency-2.html
July 4th 19 at 23:30
2 answers
July 4th 19 at 23:32
Solution
pokojan.my.id/demo/diamond/js/main.js
to edit the unit CONTACT FORM VALIDATION''S SETTINGS
And here it is necessary to change to message ceased to be mandatory? - Rowena_Ritchie46 commented on July 4th 19 at 23:35
: think about it. or the issue will go to the furnace. - kavon.Murphy commented on July 4th 19 at 23:38
$.ajax({
url: action,
type: 'POST',
data: {
contactname: $('#message contact_name').val(),
contactemail: $('#contact_email').val(),
/*contactmessage: $('#contact_message').val()*/ - Rowena_Ritchie46 commented on July 4th 19 at 23:41
clean here does not help! - Rowena_Ritchie46 commented on July 4th 19 at 23:44
not smart: I wrote "edit block CONTACT FORM VALIDATION'S SETTINGS"
literally 5 lines below this inscription. - kavon.Murphy commented on July 4th 19 at 23:47
And VALIDATION'CONTACT FORM'S SETTINGS

errorPlacement: function(error, element) {
error.insertAfter(element);
},
messages: {
name: "what's your name?",
telefon: "please Enter your phone",
/*message: "Enter message",*/
email: {
required: "please Enter the e-mail?",
email: "please Enter a valid e-mail"
}
}, - Rowena_Ritchie46 commented on July 4th 19 at 23:50
$('#contact_form').validate({
onfocusout: false,
onkeyup: false,
rules: {
name: "required",
telefon: "required",
email: {
required: true,
email: true
}
},

And where is the check for validation, no message. - Rowena_Ritchie46 commented on July 4th 19 at 23:53
: bleed.
CONTACT FORM VALIDATION''S SETTINGS
rules: {
name: "required",
message: "required",
email: {
required: true,
email: true
}
}

if that is not enough, then dude, you're in the wrong business: web dev isn't for you. - kavon.Murphy commented on July 4th 19 at 23:56
I JS don't know. Superficially only the basics of programming. Just now, immediately surfaced the question.
And therefore turn on the TOASTER. HTML and CSS better. And graphics.

And by the way, added the message: "required" - did not help... - Rowena_Ritchie46 commented on July 4th 19 at 23:59
: it is not necessary to add and remove - kavon.Murphy commented on July 5th 19 at 00:02
$('#contact_form').validate({
onfocusout: false,
onkeyup: false,
rules: {
name: "required",
telefon: "required",
email: {
required: true,
email: true
}
},

So it is not there! Or meaning you need to use another property instead of "required" ? - Rowena_Ritchie46 commented on July 5th 19 at 00:05
:
14e0556b5853449ab82535951576bf54.png - kavon.Murphy commented on July 5th 19 at 00:08
lp.rehab-resheniya.ru/js/main.js - Rowena_Ritchie46 commented on July 5th 19 at 00:11
: you scoff? show one site, then another.
the second General validation no no, the form is blank perfectly submetida.

in short. https://jsfiddle.net/4e5xj0xc/ and https://jsfiddle.net/4e5xj0xc/1/ my help is over. - kavon.Murphy commented on July 5th 19 at 00:14
July 4th 19 at 23:34
mark "*". Not to do strict checking on the filling of this field in the script
: does the front treatment - Rowena_Ritchie46 commented on July 4th 19 at 23:46
and in what script, in this case? - Rowena_Ritchie46 commented on July 4th 19 at 23:37
: contact.php - kavon.Murphy commented on July 4th 19 at 23:40
pokojan.my.id/demo/diamond/js/main.js - here sort of - Rowena_Ritchie46 commented on July 4th 19 at 23:43

Find more questions by tags jQuery