Need Customer Contact Form Validation code in Javascript.

Discussion in 'JavaScript' started by swati16, Oct 27, 2013.

  1. #1
    I have seen code in this section. But it does not match to my criteria.

    Contact Form Design code.Required fields are product requirements, Firstname, Lastname,
    email, country, phone number.(Country code displays automatically by selecting country)

    Please i need javascript validation code

    <html>
    <head>
    <title>Contact Form</title>
    </head>
    <body>
    <form action="" method="POST" NAME="ContactForm" ENCTYPE="multipart/form-data" onsubmit="">

    <!--Start-Product-Legend-->
    <label for="ProductDescription"></label>
    <textarea id="ProductDescription" name="ProductDescription"></textarea>
    <div align="RIGHT">Remaining Characters : 3500 </div>
    <input type="text" name ="FName" id="FName" >
    <input type="text" name ="LName" id="LName" >

    <input type="text" name ="Email" id="Email" >
    <input type="text" name ="CompanyName" id="CompanyName">
    <input type="text" name ="WebSite" id="WebSite">
    <input type="text" name ="City" id="City">
    <select name="CountryName" id="CountryName" class="SelMgn SelWidth">
    <option value="India " selected ="SELECTED">India</option>
    <option value="Russia">Russia</option>
    <option value="America">America</option></select>
    <input type="text" name ="MobileCode" id="MobileCode">
    <input type="text" name ="MobileNo" id="MobileNo" >
    <input class="styled-button-8" type="submit" value="Submit" name="submit"
    onclick="fnsubmit()"/>

    </body>
    </html>
     
    swati16, Oct 27, 2013 IP
  2. HowDoYou

    HowDoYou Well-Known Member

    Messages:
    443
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #2
    JQuery has several libraries that do exactly what you're asking for. Check jQuery's website. Or send me a message, I will need to see more of your code to help.
     
    HowDoYou, Nov 2, 2013 IP
  3. swati16

    swati16 Greenhorn

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    ok
    can do same validation process in php
    Please

    I want php code for same no libraries.Javascript i have done.Now I am looking for server side validation in php

    Swati
     
    swati16, Nov 3, 2013 IP
  4. HowDoYou

    HowDoYou Well-Known Member

    Messages:
    443
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #4
    If want help with php, this question should be posted in the php section. And title your post "in php" and not "In JavaScript".. and reword your question to not say "Please i need javascript validation code" . :/

    Your going to want to do some research on regex for php to meet your validation needs.
     
    HowDoYou, Nov 3, 2013 IP