We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28376
    • 222 Posts
    How do i create a forgot email page in webloginpe without clicking on a Forgot password button. I want to be able to click on a link and do a custom forgot password form.

      • 27442
      • 103 Posts
      If you want a ’forgot password’ link to a new page instead of the normal button function (which stays on the same page), this should work, but would require an extra click from your user (which your user would percieve as redundant, but is neccessarey for webloginpe)

      For example, your main/normal webloginpe call would be something like:
       [[WebLoginPE? &regHomeId=`##` &profileHomeId=`##` &loginFormTpl=`MyLoginChunk` &liHomeId=`##,##` &loHomeId=`##`]] 

      And MyLoginChunk would be something like:
      [+wlpe.message+]
      <div id="wlpeLogin">
      	<form id="wlpeLoginForm" action="[~[*id*]~]" method="post">
      		<fieldset id="wlpeLoginFieldset">
      			<legend id="wlpeLegend">Login</legend>
      			<label id="wlpeUsernameLabel" for="wlpeUsername"><small>Username</small>
      				<input id="wlpeUsername" type="text" name="username" size="12" />
      			</label><br />
      			
      			<label id="wlpePasswordLabel" for="wlpePassword">Password
      				<input id="wlpePassword" type="password" name="password" size="12" />
      			</label><br />
      			
      			<label id="wlpeStayLoggedInLabel" for="wlpeStayLoggedIn">Stay Logged In
      				<select id="wlpeStayLoggedIn" name="stayloggedin">
      					<option value="">No</option>
      					<option value="3600">1 Hour</option>
      					<option value="86400">1 Day</option>
      					<option value="604800">1 Week</option>
      					<option value="2678400">1 Month</option>
      					<option value="315569260">Forever</option>
      				</select>
      			</label>
      			
      		</fieldset>
      		<fieldset id="wlpeLoginButtons">
      			<button type="submit" id="wlpeLoginButton" name="service" value="login">Login</button>
      			<button type="submit" id="wlpeRegisterButton" name="service" value="registernew">Register</button>
      		</fieldset>
      	</form>
      	<a href="[~xx~]">Forgot Password Page</a>
      
      </div>

      Then, your seperate, ’Forgot Password Page’ would be another webloginpe call with a very simple &loginFormTpl. Since we can’t seem to access the ’service’ directly without Post-ing, this would be where the user would have to provide the seemingly unneeded click. (***see footnote about this page):
      [[WebLoginPE? &loginFormTpl=`ClickForgotChunk`]]

      where the ’ClickForgotChunk’ would be as simple as:
      [+wlpe.message+]
      <div id="wlpeLogin">
      	<form id="wlpeLoginForm" action="[~[*id*]~]" method="post">
      			<button type="submit" id="wlpeReminderButton" name="service" value="forgot">Forgot Password</button>
      	</form>
      </div>

      ***footnote: Remember that WebLoginPE does not play nicely with 2 calls on the same page. So, if your original call is from your template’s sidebar (my guess), you’ll need to have a clean template for this page.