Changing username_box input type


#1

Squiz Matrix v5.3.3.0

Usernames for part of our site are always email addresses. 60% of visitors are using a mobile device, so we’d like to make life as easy as possible for them and help show a mobile keyboard that reflects they’ll be entering an email address.

Our login design uses <MySource_PRINT var=“username_box”… to display the username input field as per https://matrix.squiz.net/manuals/designs/chapters/login-form-design-area

By default the input type is set to text, which is fair enough. But we’d like to set the input type to email. Is that possible?

The manual mentions that “Any extra arguments that can be added to the HTML tag can also be used with variable.” but given that the type is already set to text adding type=“email” doesn’t do anything.

Any suggestions?


(Bart Banda) #2

Hmm, I don’t think that’s possible without some JS. Have added it to our roadmap as a thing to support though, sounds reasonable and easy enough to achieve. https://squizmap.squiz.net/matrix/11698

Another option for customising the login screen could be to use an Account Manager asset instead?


#3

If that’s all you want, Javascript is the quickest way. Alternatively you can use %login_form^replace:[what ever you want to replace] which is more reliable as it doesn’t depend on what client does.


#4

Thanks both, we’ll just use Javascript for now.