Forum

Thread tagged as: Question, Problem, Members

Members App - Additional Password Required

Hello,

Is it possible to request a member creates 2 passwords on registration?

The idea is to have a password field and a memorable word field that needs to be entered to login in.

I have tried to achieve this however when I login although the email and password is required and works as it should the second password or memorable word field does not, allowing for any word to be entered and still logging in.

My code:


<div> <perch:label for="secret_word">secret_word</perch:label> <perch:input type="password" id="secret_word" required="true" match-with="secret_word2" /> <perch:error for="password" type="required">Please add a password</perch:error> <perch:error for="password" type="match">Passwords do not match</perch:error> </div> <div> <perch:label for="secret_word2">secret_word again</perch:label> <perch:input type="password" id="secret_word2" required="true" /> <perch:error for="secret_word2" type="required">secret_word</perch:error> </div>

Login html code:



<perch:form id="login" method="post" app="perch_members"> <fieldset> <legend>Log in</legend> <perch:error for="all" type="login"> <p class="error">Those details do not match our records.</p> </perch:error> <div> <perch:label for="email">Email</perch:label> <perch:input type="email" id="email" required="true" label="Email" /> <perch:error for="email" type="required">Required</perch:error> <perch:error for="email" type="format">Check format of address</perch:error> </div> <div> <perch:label for="password">Password</perch:label> <perch:input type="password" id="password" required="true" label="Password" /> <perch:error for="password" type="required">Required</perch:error> </div> <div> <perch:label for="secret_word">secret_word</perch:label> <perch:input type="password" id="secret_word" required="true" label="secret_word" /> <perch:error for="secret_word" type="required">secret_word Required</perch:error> </div> <div> <perch:input type="submit" id="submit" value="Log in" /> <perch:input type="hidden" id="r" /> <p>Forgotten your password? <a href="/members/reset.php">Reset it now</a>.</p> </div> </fieldset> </perch:form>

help appreciated

Gary Thompson

Gary Thompson 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The secret word field should be created that way, but you have nothing in place to check that it's valid.

Thanks Drew,

How do I go about checking it is valid? Is that done similar to the password.html file?

Drew McLellan

Drew McLellan 2638 points
Perch Support

There's no built in functionality to do that.