• I’m using a login form on my index including a ‘remember me’ checkbox, now i want to remove the checkbox, but everyone who logs in has to set to ‘remember’. Is this possible to do without a checkbox?

    My login form code:


    <div id="login">

    <?php
    if ( $error )
    echo "<div id='login_error'>$error</div>";
    ?>

    <form name="loginform" id="loginform" action="wp-login.php" method="post">
    <input style="font-size: 9px; border:none; background: #595959; color:#fff" type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" size="7" tabindex="1" />

    <input style="font-size: 9px; border:none; background: #595959; color:#fff" type="password" name="pwd" id="pwd" value="" size="7" tabindex="2" />

    <input type="submit" class="submit" name="submit" id="submit" value="" tabindex="4" />

    <div id="checkbox"><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />Remember me</div>
    <input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($redirect_to); ?>" />

    </form>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try replacing:

    <input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />

    with:

    <input name="rememberme" type="hidden" id="rememberme" value="forever" tabindex="3" />

    Cheesy, but ought to work.

    Thread Starter davey579

    (@davey579)

    I think it works, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Automatically remember me’ is closed to new replies.