View Full Version : Validate Form Issue

10-06-2007, 02:47 AM
In DW8, after adding a validate from behavior to
the submit button, any List/Menu pulldown will
not appear so that one can cehck it as required.
All other field types seem to appear OK



10-15-2007, 07:10 PM
This has been an issue with DW for sometime, not sure why it does that. I have seen posts like this before and most would recommend using PHP to validate your form. I'm not a PHP expert so i can't really help with that, but maybe it will point you in the right direction

10-15-2007, 11:54 PM
most would recommend using PHP to validate your form.

That is your answer

10-16-2007, 06:11 AM
it depends on what your validating

if you checking to see if a required field is keyed its advisable to use JS as the submit should fail. Sending an incomplete form to the server when you know its invalid is a waste of server processing. You could even use a mask to make sure the entry complies with any formating rules.

i initially use JS to make sure any rules are followed. I still add some server side validation even though i have used JS as i want to catch those people who have JS switched off but by doing both i am saving the server load 99% of all submissions and still validating the 1% left by using the server.

so the answer is both

10-16-2007, 03:22 PM
That is your answer

no, that was part of my answer. If you read the rest I did state that I am not a PHP expert!. I was repeating what I have read in other posts. Some say to use JS some say PHP. Some say not JS because it can be enabled rendering your validation useless so I went with PHP.

If you look at the date aargus07 posted this, it was 10 days ago and no one had responded so I was simply trying to point him/her in the right direction. I was also hoping that by me responding it would bump this post to the "Todays Post" or "New Post" and another member could give a better answer than I did - Just like DJ did!

I short - your reply was unnecessary neon. If I answered incorrectly I apologize for that, but please let me know by posting how I was wrong and giving a better answer, so both aargus07 and I can learn. I all I am saying is posts like that accomplish nothing. No hard feelings, I hope?

10-16-2007, 03:45 PM
A usability concern here.. if you validate the form using JS, how would devices not using JS be able to use the form?

10-16-2007, 04:10 PM
That was my understanding Dom, what would you recommend would be the better way to validate?

10-16-2007, 04:26 PM
I would use a server side validation.

10-17-2007, 07:54 AM
I would use a server side validation.

i would do both.

imagine many connections on your server

you have users that have an empty address field which they have missed

far better validate before adding load to the server. Obviously still use server side validation to catch those who dont use JS which wont really impact on performance but i still recomend using both. By using JS you can inform a user straight away that a field is required before sending a boat load of data to the server to fail.

10-17-2007, 09:27 AM
absolutely especially with slow connections it is muchbetter to get an immediate javascript alert, and the real valdation is with php