Safari incorrectly autofills an email input field with the username

Joined
Jul 12, 2017
Messages
1
Reaction score
0
Points
1
Hello,

I am using a wordpress plug-in that generates HTML for registration forms. The form includes an input field for the email address (that the plug-in pre-fills with the email address already supplied) and an input field for the password (which you leave blank unless you want to change it) among other things. Here is a snippet of the HTML they generate:

Code:
<div class="swpm-edit-profile-form">
    <form id="swpm-editprofile-form" name="swpm-editprofile-form" method="post" action="" class="swpm-validate-form">
        <input type="hidden" id="swpm_profile_edit_nonce_val" name="swpm_profile_edit_nonce_val" value="5fdf1731e4" /><input type="hidden" name="_wp_http_referer" value="/my-membership/my-profile" />        <table>
            <tr class="swpm-profile-username-row">
                <td><label for="user_name">Username</label></td>
                <td>admin</td>
            </tr>
            <tr class="swpm-profile-email-row">
                <td><label for="email">Email</label></td>
                <td><input type="text" id="email" class="validate[required,custom[email],ajax[ajaxEmailCall]]" value="[email protected]" size="50" name="email" /></td>
            </tr>
            <tr class="swpm-profile-password-row">
                <td><label for="password">Password</label></td>
                <td><input type="password" id="password" value="" size="50" name="password" placeholder="Leave empty to keep the current password" /></td>
            </tr>
            <tr class="swpm-profile-password-retype-row">
                <td><label for="password_re">Repeat Password</label></td>
                <td><input type="password" id="password_re" value="" size="50" name="password_re" placeholder="Leave empty to keep the current password" /></td>
            </tr>

When this HTML is displayed in Safari, the email field is autofilled with the memorized username (not email) used for the site and the first password field is autofilled as well. Can anyone explain why this is happening? I attached a form that is not autofilled and a form that is. Screen Shot 2017-07-12 at 9.08.53 PM.png Screen Shot 2017-07-12 at 9.08.36 PM.png
 
Last edited:

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Apart from the standard <INPUT> types, HTML5 added a few more including type="email" that might give Safari's autofill a chance t not mess up. The browser autofill is a little crude at best and works really well with a few forms but miserably with most that don't conform to some standard.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top