Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: form validation

  1. #1
    New Coder
    Join Date
    Apr 2006
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form validation

    Hi,

    I'm in way over my head on a project here - i'm building a site for a regular client, who in the past have looked after all forms themselves. suddenly on this project they have just told us that we are to build an email form that needs to meet all sorts of criteria and also needs to use all sorts of javascript validation.

    I've never had to do any of this before and the projects is already late!

    is there anyone here who may be able to help? I have all the instructions they have supplied (it's just over my head) as well as some sample scripts.

    The main instructions they have given are:

    Please inform the developer that:

    - the email needs to meet a specific format requirement (see attachment)
    - Use JavaScript to control State/Postcode according to Country selection
    - the length of “Manufacturing Date Code” should be 14
    - Use JavaScript to validation data (e.g. all compulsory fields, home/work/mobile numbers, “number of faulty items within pack”) on client-site before sending the email. Note: although the attached sample code does both client-site and server-site validation, they need to review the code and implement good client-site JavaScript validation
    - sample email should be sent to [email supplied]

    I have created the form itsefl, i just have no idea how to apply the scripts they are asking for.

    any help would be greatly appreciated

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You should start by explaining your client the following:
    1. Using mail protocol <form action="mailto:.... for form processing is the worst way to process the form. Not only this can not guarantee the validity of data, but gives the email address to every spam bot out there. After a few weeks trying to find a form entry among all the spam will be like looking for a needle in a haystack....
    2. Javascript can not validate data. It can be disabled and any information can be sent on its way.
    3. Proper way to do form processing is:
    - client side scripting (javascript) provides form data verification and user convinience features - sparing the round trip to the server due to a typo or missing field.
    - server side script that receives the data does the actual validation, and if everything is ok, storing the data or e-mailing it. This way you can assure both accuracy of the data and privacy of the e-mail address.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #3
    New Coder
    Join Date
    Apr 2006
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks

    thanks Vladdy,

    unfortunately it's not up to me, the client has a number of sites that use this method for their contact forms. Even if it was up to me, i wouldn't be able to provide any other solution as i am merely a humble html/css designer and faint at the sight of anyhting that has variables

    I have just found that this forum has a paid section wehre i can ask someone to do the job for me for a fee, i may have to resort to that (just have to ask the boss first). Normally i'd try to work it out myself, but i really just don't have the time at the moment and my head already hurts enough!

    thanks for taking the time though...

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I can quote the job for you if you like, as long as your client understands the consequences...
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #5
    New Coder
    Join Date
    Apr 2006
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks again Vladdy - i have just gone over it with my boss and he is going back to the client with some options at the moment.

    I will certainly keep you in mind if we do need to get it done in the end.


  •  

    Posting Permissions

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