I have a login design applied with standard input fields for username & password. These use the Matrix username_box variable.
From the Design Manual…
"This variable will print the username box. Any extra arguments that can be added to the HTML <input> tag can also be used with variable. For example, in the code below, size=”10” is used with this variable. This defines the size of the box."
I have added the HTML tag 'value' which you can see below. This should give a default value "Enter your username here" in the username input field.
<MySource_PRINT var="username_box" value="Enter your username here" size="30" class="sq-data" />
However, the field just appears blank. Is anyone able to shed any light on why this would be the case? Has anyone been able to get this to work??
The value of this field is hard-coded a a blank string. As far as I can tell, you cannot override it.
OK - I am trying to create a 'Remember Me' function on our login page using some Javascript and Cookies to remember the login details. The only way I can think of getting this to work is to be able to pass values to the Username field. Are there are other solutions? It will make our Intranet site a lot more user-friendly if users don't have to enter their username and password every single time. 'Remember me' is used a lot on other websites such as Facebook etc. Any ideas?
How about just use Firefox and the built in feature for automatically entering in your password? Then all you have to do is click login.
A "remember me" feature keeps you logged in. The auto-filling of usernames and passwords is done by the browser (as Nic says). If you want Matrix to keep users logged even when their browser is closed, you can change the session expiry rules.
Go to System Configuration > Global Preferences and then change the default session expiry from "When the user closes the browser" to a time period of your choosing.
If you have a mix of internal and external users, you can configure this just for your internal users by going to the Preferences screen of the User Group that contains all your users. So all external user are logged out as soon as they close their browser, but all staff remain logged in for 30 days.
Thanks all for the suggestions. I'm aware of auto-complete but I was hoping for something that doesn't rely on browser functionality. Approx. 98% of our users browse with Internet Explorer so that rules out Firefox.
The session expiry rules are not something I had looked at before and seems to be a better solution than what I was trying to do anyway. Thanks Greg for that suggestion - I will probably go that way.