Re: Elegance is the goal... Sticky form submit help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sep 11, 2010, at 11:55 AM, tedd wrote:

At 9:49 AM -0400 9/11/10, Jason Pruim wrote:
Hey everyone!

Hope you are having a great weekend, and I'm hoping someone might be coherent enough to help me find a more elegant solution to a problem that I have...

I have a form for submitting an event to a website, and if the form is not submitted successfully (such as they didn't fill out a required field) I want it to redisplay the form with inline errors as to what happened and display the values they selected...

-snip-

Any ideas what I'm missing?

Jason:

I think what you are missing is that this data collection should be split between client-side and server-side operations.

Hey tedd,

Thanks for the response but for this particular project I'm avoiding using anything but standard HTML since it will be used almost exclusively by people using screen readers and other assistive technology so I'm going a little old school with it to make sure it all works for everyone else first.



For client-side simply use javascript to monitor what they user enters and then immediately respond to the requirements imposed upon the user.

After the user fills out the information correctly and clicks submit, then have your server-side scripts check the data again and respond accordingly.

Here are a couple of examples:

http://webbytedd.com/c/form-calc/

http://webbytedd.com/c/form-submit/

I will definitely be checking out your examples though! Some of the cleanest, well documented, and easiest to read code I have seen in a long time!




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux