开发者

Firefox stored userid and password showing up in my form

开发者 https://www.devze.com 2023-03-28 20:18 出处:网络
I am building a form for changing a users password in the database.Typical: Ask for the current password, a new password and to re-type the new password.

I am building a form for changing a users password in the database. Typical: Ask for the current password, a new password and to re-type the new password.

My problem is that the cached userid and password for the website are showing up in the current password field (userid shows up) and the new password field (current password shows up). Of course if I clear all credentials from FF's cache it doesn't show up. My question is why is it showing up here. I have changed the names of the field and the value field is empty. I don't understand where it is coming from. Any help will be greatly appreciated. BTW it doesn't appear to happen in IE or Chrome brows开发者_StackOverflow社区ers...

Below is my code:

        <li id="li_1" >
    <label class="description" for="element_1">Current Password </label>
    <div>
        <input id="element_1" name="old_pass" class="element text medium" type="text" maxlength="255" value=""/> 
    </div><p class="guidelines" id="guide_1"><small>Enter your current password</small></p> 
    </li>       <li class="section_break">

    </li>       <li id="li_3" >
    <label class="description" for="element_3">New Password </label>
    <div>
        **<input id="element_3" name="new_pass" class="element text medium" type="password" maxlength="255" value=""/>** 
    </div><p class="guidelines" id="guide_3"><small>Enter your new Password</small></p> 
    </li>       <li id="li_4" >
    <label class="description" for="element_4">Confirm New Password </label>
    <div>
        **<input id="element_4" name="new_pass2" class="element text medium" type="password" maxlength="255" value=""/>** 
    </div><p class="guidelines" id="guide_4"><small>Re-type your new password</small></p> 
    </li>

                <li class="buttons">
            <input type="hidden" name="form_id" value="230071" />

            <input id="saveForm" class="button_text" type="submit" name="submit2" value="Submit" />


As you found out you can use...

autocomplete="off"

... to turn off that annoying auto-complete :)

I'm no expert but I guess the secret of auto-complete is to map user input with field names/ids/types etc. But that could be all wrong, I don't know, but it sounds plausible.

0

精彩评论

暂无评论...
验证码 换一张
取 消