SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How I can prevent the user form Enter same data when into Custoemrs form ?

    Hi
    I have PHP form application used to by Sales reps to Enter information about customers but I want to prevent Sales reps from entering same information because of web form behavior after they want to add new customer ?
    is their away in using Jquery to clear the form for new entry ??

  2. #2
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do something like this and it will reset every form element to its original value:

    Code:
    $('#myform').each (function(){
      this.reset();
    });
    Web designer, programmer & webmaster for 7+ years
    Hosting 11 sites in Hospedaje Web México
    CentOS|cPanel|R1Soft|Softaculous|Cloud Hosting|Green Hosting

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank for help

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,716
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    Typically the autocomplete on form fields appears based on the name of the form field. So, if you give the form field a unique name, perhaps by making use of time/date or a unique hash, that can be a viable solution too.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Tags for this Thread

Bookmarks

Posting Permissions

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