Hi All,
I have a login form with 3 fields Username, Password and Account name (all three set to required true and autocomplete="off")
<input id="loginemail" autocomplete="off" data-bind="ojComponent: {component: 'ojInputText', value: loginemail, placeholder: 'Registered email address', required: true}">
<input id="loginpassword" autocomplete="off" data-bind="ojComponent: {component: 'ojInputPassword', value: loginpassword, placeholder: 'Password for the PIC account', required: true}">
<input id="accountname" autocomplete="off" data-bind="ojComponent: {component: 'ojInputText', value: accountname, placeholder: 'PIC account name', required: true}">
Everything works fine except:
- Even though autocomplete="off", Chrome still offers to save the username and password (seems like a Chrome quirk). As a result of this, if a user chose to save the credentials, Chrome will autofill the form but will not trigger a Knockout state change. This causes issue as the API gets the username, password field as "". Online there are workarounds suggested including one from Knockout (Knockout : The "textInput" binding ). How do I use it with ojInputText ?
- Does "required: true" just add a * to the label or it also checks if the field is actually populated ? Its a hit or miss, sometimes it works sometimes it does not. Is this also related to Knockout change event not being fired correctly ?
How to handle these issues ?