Menu

#7 Survey Reponse Validation

open
None
5
2003-07-21
2002-12-05
No

Hi.

Here is some code that will check survey responses for
valid input. I.e. numerics are tested to be numbers,
dates as dates, and the number of checkboxes selected
is compared to min (aka length) and max (aka precise).
FWIW, the code was originally based on the "check
required" function.

I regret that I can't provide a proper diff, I'm
technically inept in that regard =), and besides, it
would be cluttered with other customizations that are
irrelevant to phpESP anyway.

The attached text file has 2 functions that can be
placed anywhere, I suggest espresponse.inc. And 3
lines to be added to handler.php.

Hope this is useful.

Regards!

Leonard.
http://www.lc.yi.org

Discussion

  • Leonard Chan

    Leonard Chan - 2002-12-05

    Two functions, plus a few lines for good measure.

     
  • Kon Angelopoulos

    • assigned_to: nobody --> angek
     
  • Kon Angelopoulos

    Logged In: YES
    user_id=198398

    Sounds interesting.
    I'm going to incorporate it into the devel version and give it a
    bashing :)

     
  • Kon Angelopoulos

    Logged In: YES
    user_id=198398

    Sounds interesting.
    I'm going to incorporate it into the devel version and give it a
    bashing :)

     

Log in to post a comment.