Hello Everbody, My names andy and am a newby here, with some Knowledge to Web design..But not a Pro. by far not.
I have a website am working on, that will advertise a hoilday Let...
The contact forms are done in PHP and is Vaildated and asks for items like Name , email, address, and so on. On the same page is the jquery Datepicker and it to is Vaildated with this call to script <script src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>.
The problem am facing is, I can not make these too Vaildation work together on the same page.
When the PHP fields for the Name and Email are filled in, you then select the dates you want from the datepicker,, then you press Submit, and the form is Submitted if all field are Right. and thats what i want.
But the snag is if you dont select any date from the picker and press submit,, it will send with empty fields from the picker and not pick up on the empty form.
Both these codes work great on there own, but joint them together on one page one underneath each other and the PHP takes control and the script does not run the Vaildation for the picker. The picker does work if you do input the date, it will email all the forms. Oh and there is just one submit button.
Can show the code
Any ideas of how to fix this.
Hopefully I've understood what you're trying to say, posting the code you're using would be helpful!
The validation of the form that you require has to be done on the server as that's the only place where you have control of whether it runs or not.
Hi Andy16296. Welcome to the forums.
Does the PHP part of the form check to see if the date field is empty?
Yes the Php code all works and vaildates the form field and so does the datepicker's form that all works too. the problem lie when i place them together on the page only the php would work then. what am going to do is to post my code on here if you could take a look. thanks andy
Thanks Alex for the reply,, I will post the code on here , if you dont mine taking a look. thanks andy
This topic is now closed. New replies are no longer allowed.