Developer forum

Forum » CMS - Standard features » Remember Me on login

Remember Me on login

Søren Bremholm Jakobsen
Reply

Hi,

I'm trying to implement "Remember Me" on a login template, but can't get the functionality to work - DW version 8.9.2.3.

Which tags (id and name) do I have to use?

This is my code:

<li class="m_bottom_15">

<label for="username" class="m_bottom_5 d_inline_b">@Translate("Login.Username")</label><br />

<input type="text" id="login-username" class="r_corners full_width" name="login-username" />

</li>

<li class="m_bottom_25">

<label for="password" class="m_bottom_5 d_inline_b">@Translate("Login.Password")</label><br />

<input type="password" id="login-password" class="r_corners full_width" name="login-password" />

</li>

<li class="m_bottom_15">

<input type="checkbox" name="login-rememberme" id="login-rememberme" /><label for="login-rememberme">@Translate("Login.RememberMe")</label>

</li>

Thanks in advance


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

Hi Søren,

If you want the system to remember the username/password then you can include two checkboxes (or hidden input fields) for DWExtranetUsernameRemember and DWExtranetPasswordRemember. Then the username/password input fields can be prefilled on the login form when the user returns to the site.

If you also want the user to be logged in automatically then you can include another checkbox (or hidden input field) for Autologin.

Here is an example that uses autologin:

<form method="post">
    <label>Username <input name="Username" /></label>
    <label>Password <input name="Password" type="password" /></label>
 
    <input name="DWExtranetUsernameRemember" value="true" type="hidden" />
    <input name="DWExtranetPasswordRemember" value="true" type="hidden" />
 
    <label><input name="Autologin" value="true" type="checkbox" checked /> Autologin</label>
 
    <button type="submit">Login</button>
</form>

 

Votes for this answer: 1
 
Søren Bremholm Jakobsen
Reply

Thanks Morten,

if works perfectly in Firefox and Chrome but not in IE and Edge. Do you have any input on that issue?

 
Søren Bremholm Jakobsen
Reply

Sorry Morten - It works. Thanks

 

You must be logged in to post in the forum