MENU

Front End Users one field login form

  Previous article Next article  

To enter a protected area at your website using the Front End Users module you need a login name and password. Sometimes it is more convenient to have just one field.

  How to use

I will describe two methods. Choose the one which suits you the most...
In both cases one of the form fields is pre filled in and is hidden so only one field is visible to the visitor.

A. Let all users log in with just one "password".

Create in the Front End Users Admin page a new user named i.e. "FEUser" and fill in the password you want to use.

Open in Design Manager the "FrontEndUsers::login form" and change this line:

<input type="{if $username_is_email}email{else}text{/if}" id="feu_username" name="{$fldname_username}" value="{$username}" size="{$username_size}" maxlength="{$username_maxlength}" {if !$username_is_email}autocorrect="off" autocapitalize="off"{/if} required/>

into:

<input type="hidden" id="feu_username" name="{$fldname_username}" value="FEUser" style="display: none" required />

What I do here is giving the username field a default value and afterwards hide it!
By changing the template and using CSS you can hide the fields and labels you don't want to show.

B. Give each user his/her own login name.

Create in the FEU Admin page a few users and use the same password each time, i.e. "DefaultPassword".

Open in Design Manager the "FrontEndUsers::login form" and change this line:

<input type="password" id="feu_password" name="{$fldname_password}" value="{$password}" size="{$password_size}" maxlength="{$password_maxlength}" required/>

into:

<input type="hidden" id="feu_password" name="{$fldname_password}" value="DefaultPassword" size="{$password_size}" maxlength="{$password_maxlength}" style="display: none" required />

What I do here is giving the password field a default value and afterwards hide it!
By changing the template and using CSS you can hide the fields and labels you don't want to show.



Buy Me A Coffee


  Comment Form

ReviewManager

Click here to open the form

ReviewManager

  0 Comments

No comments yet...

Buy Me A Coffee

CMS Made Simple - Tutorials, Tips and Tricks - CMSMS

Front End Users one field login form

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.2.19
  Last updated: 23-06-2018
  Comments: 0
  http://cms.ms/cpUb


Buy Me A Coffee




Advertisement


Ads help me to help you! Thanks!

Ads help me to help you! Buy products from these advertisers!