php - Include space between two words Javascript if() statement -
I am trying to validate the generic contact form provided by my CRM, unfortunately they control the server side script Do the information that is in the CRM
Some form fields have empty spaces in them. How do I adjust for this?
if (document.contact_form.First name.value == "") {Warning ("Please fill in 'first name' box.); Valid = false; }
Try it out:
.contact_form ['first name']. Value == "")
Edit: This is not directly related to your question, but you should be aware that "" does not ensure that That it is not empty, the user can enter a location and your code will mark that field as valid, which is probably not what you want. The best way is to trim the price and then check if it is empty or not.
Comments
Post a Comment