Support » Plugins » Custom reset password form

  • Hi,

    I am wanting to add a custom reset password form to the homepage of my site. It is actually in a hidden div that will reveal when the user hits the reset password button.
    I want all the error handling to take place in the lost password div, So display any messages below the rest my password button.
    This code below works in that it reset my password button does send the user a reset link.

    <div id="lostpassword" class="lostpassword span12 hero-search">
    				<form method="post" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" class="wp-user-form">
    <div class="span12">
    <h2>Enter your username or email and complete the captcha to reset your password.</h2>
    <div class="span7">	
    <div class="username">
    <label for="user_login" class="hide"><?php _e('Username or Email'); ?>: </label>
    <input type="text" class="search-query" name="user_login" value="" size="20" id="user_login" tabindex="1001" placeholder="Username or email address" />
    <div class="span4 captcha ">
    <?php if( function_exists( 'cptch_display_captcha_custom' ) ) { echo "<input type='hidden' name='cntctfrm_contact_action' value='true' />"; echo cptch_display_captcha_custom(); } ?><br/>
    <?php if( function_exists( 'cptch_check_custom_form' ) && cptch_check_custom_form() !== true )?>
    <div class="span4 offset4">
    <?php do_action('login_form', 'resetpass'); ?>
    <input type="submit" id="searchsubmit" name="user-submit " value="<?php _e('Reset my password'); ?>" class="user-submit btn" tabindex="1002" />
    <?php $reset = $_GET['reset']; if($reset == true) { echo '<p>A message will be sent to your email address.</p>'; } ?>
    <input type="hidden" name="redirect_to" value="/" />
    <input type="hidden" name="user-cookie" value="1" />

    However how can I make it so that the user never sees the default wordpress form?
    Ideally I want the code to all be on one place, as the theme I am using, uses complex includes, so the actually page is made up of seversl php files.


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom reset password form’ is closed to new replies.