• Resolved AWOL

    (@awol)


    Hi,
    I think I have found a small error in the code for the login page (login.php). Basically I was trying to make it so that the ‘Remember Me’ checkbox was already ticked, but whatever I tried wasn’t working. On looking at that file, on line 42 is this:

    <span class="swpm-remember-checkbox"><input type="checkbox" name="rememberme" id="swpm-rememberme" value="checked='checked'"></span>

    I think this is meant to be (if the idea is to have the box ticked) the following:

    <span class="swpm-remember-checkbox"><input type="checkbox" name="rememberme" id="swpm-rememberme" value="" checked></span>

    I have made a copy of login.php with this change and put it in my child theme/simple-membership folder and now the box is ticked on load. Maybe something that needs changing in the next update?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    Basically I was trying to make it so that the ‘Remember Me’ checkbox was already ticked, but whatever I tried wasn’t working.

    Can you provide more information so that I know exactly what you were trying to achieve.

    Thank you.

    Thread Starter AWOL

    (@awol)

    Hi @mbrsolution,
    As I said, on the login page I wanted the ‘Remember Me’ checkbox already ticked for users when logging in; this wasn’t the case, and when I added some simple code to do this in my child theme functions.php file, this didn’t work. I then examined the login page using the browser code inspector and found what I believe to be incorrect code (as I pasted in my original post), and when I altered the code (as above) I achieved my goal. I was just making you, the plugin authors, and other users aware of this, as I think it is something that others might also want.

    Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for clarifying further the information above. I have submitted a message to the developers to investigate further your issue/solution/request.

    Kind regards.

    Plugin Author wp.insider

    (@wpinsider-1)

    Hi, Thank you for your suggestion. The code there is fine. When the value parameter is set in a checkbox, it means that is the value that will be sent to the server upon form submission (if the checkbox is checked). So given how our plugin was handling the form submission, it is fine. I will rework that code to make it more easy to understand.

    What you suggested is ALSO correct way to create a checkbox type field.

    Thread Starter AWOL

    (@awol)

    Hi @wpinsider-1,
    Thanks for your reply. I am sure you are correct, but the code as it stood was not automatically ticking the box, which is why I started looking into it in the first place; with my amended code it does. If it helps you to look into this, I am using a child theme of the Blocksy theme. I don’t have any custom code that impacts the login page, but I do have several other plugins, so it is possible that something is conflicting. I have Simple Membership on another site with the same theme and a heap of other plugins and there is no issue. I will see if I can work out where the conflict might be and will update here if I find it, but my fix was pretty easy, whereas isolating a conflict is not!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remember Me’ is closed to new replies.