How to remove auto fill/auto complete?

Discussion in 'PHP' started by amjath123, Feb 9, 2012.

  1. #1
    Hi,
    I have created a registration page recently for webinar purpose. If someone registered once and come back to the registration form again, auto complete appears in all the fields when he double click on each field or press the down arrow key in each field.

    Could you any of help me to sort this out?



    Thanks,
     
    amjath123, Feb 9, 2012 IP
  2. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #2
    You can use autocomplete='off'


    
    <input type="text" name="field" autocomplete='off'/>
    
    HTML:
     
    GMF, Feb 9, 2012 IP
  3. amjath123

    amjath123 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Should I use it many times?

    like
    <td width="30%"align="right" ><?php if(isset($_SESSION['error'])){ echo $_SESSION['error']; unset($_SESSION['error']); }?>&nbsp;</td>
    <td width="50%"></td>
    </tr><tr>
    <td width="26%"align="right" ><p>First name <span class="star">*</span> :</p></td>
    <td width="50%"><input name="first_name" type="text" autocomplete='off' id="first_name" maxlength="50" style="width:320px;" /></td>
    </tr><tr>
    <td width="26%"align="right" ><p>Last name <span class="star">*</span> :</p></td>
    <td width="50%"><input name="last_name" type="text" autocomplete='off' id="last_name" maxlength="50" style="width:320px;" /></td>
    </tr><tr>
    <td align="right" ><p>Job function <span class="star">*</span> :</p></td>
    <td width="50%">

    Thanks,
     
    amjath123, Feb 9, 2012 IP
  4. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #4
    I never used it yet, but I think: Yes, use it for every formfield which you do not want autocomplete.
     
    GMF, Feb 9, 2012 IP
  5. amjath123

    amjath123 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi I put it in all the form fields and it worked! Thanks, but hope there must be a way to enter only once instead of using in all the form fields.
     
    amjath123, Feb 9, 2012 IP