www.webdeveloper.com
Results 1 to 5 of 5

Thread: Form Validation

  1. #1
    Join Date
    Mar 2014
    Posts
    28

    Form Validation

    Hi there,

    I'm having a small issue on my current form, the form itself is not validating the required fields and when you hit submit it automatically pushes through even if there isn't any information added. Somehow it works on firefox and chrome, but not safari. Can someone guide me through and show me what I may be doing wrong?

    http://dev.colincowie.com/event-inquiries/

    Thank you in advance.

  2. #2
    Join Date
    Mar 2012
    Posts
    1,753
    Firstly - In-browser validation is a waste of time. It is too easily bypassed. You will have to re-validate server-side anyway.

    Secondly - Light blue text on a white background is just silly. I can barely read it, and I'm short sighted (which gives me better than 20:20 vision so long as I stick my nose next to the screen).

  3. #3
    Join Date
    Mar 2014
    Posts
    28
    Firstly, its not light blue, its purple and its part of company branding.

    Secondly, I'm asking for a way to fix validation, its not intended to be "in-browser" validation. Someone advised me to use jquery.validation but I want to know how to incorporate it correctly or if there's an easier way to fix the issue I'm having.

  4. #4
    Quote Originally Posted by bacosta13 View Post
    Firstly, its not light blue, its purple and its part of company branding.
    Branding is great right up until it impacts usability and accessibility -- between the goofy thin font and illegible colour contrasts, the page could be useless to as much as half the population; there's a reason the WCAG and every other usability guide has actual MATH for determining legible colour contrasts. If the branding gets in the way of it being useful, time to use the branding somewhere else or kick it to the curb!

    That goofy illegible webfont makes me want to jab out my eyeballs too -- probably looks great on OSX, but it looks like someone wiped their backside and smeared it on the display in Windows and Linsux.

    Quote Originally Posted by bacosta13 View Post
    Secondly, I'm asking for a way to fix validation, its not intended to be "in-browser" validation. Someone advised me to use jquery.validation but I want to know how to incorporate it correctly or if there's an easier way to fix the issue I'm having.
    In-browser validation, aka client-side validation is what jQuery DOES. JavaScript runs client-side, which means it's USELESS for actual security purposes as it can be slapped aside with ease.

    What you NEED is server-side validation before you even THINK about adding JavaScript to it... so what is it back-ended with? What does the code on the back-end look like?

    Though the front-end code for that FORM doesn't bode well -- tables for layout, non-semantic markup, no LABEL tags, no structural relationships between the text and their tags -- the markup should be thrown out and rewritten before even worrying about processing what it feeds to the server.

    My advice:

    1) Drag the markup for the form kicking and screaming into being a valid/proper form.

    2) make server-side validation and get it working without JavaScript

    3) if desired at that point, enhance that functionality with scripting. I'd suggest avoiding fat bloated slow jquery crap on that...

    There is no 'simple' solution here -- to me it looks like you've been led astray by some bad advice and worse development practices.

    Though that's guessing WILDLY as I don't know enough about your skills, this site, or what it's doing on the back-end.

  5. #5
    Join Date
    Mar 2014
    Posts
    28
    Well, I agree with you "deathshadow" as you make solid points...Not my idea of having the design set the way it is, but its not my design.

    So, as far as your advice goes...as of this moment, what would be the quickest and easiest way to refix the form using a server-side validation?

    I never done a server-side validation before...so I'm willing to learn the best way I can, much appreciated if you or anyone can guide me.

    Thanks in advance.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles