deemuss Posted April 12, 2019 Report Share Posted April 12, 2019 Is it possible to add "Remember me" checkbox so users would not need to enter their data every time they go to the deployed page? Quote Link to comment Share on other sites More sharing options...
Alison Posted April 12, 2019 Report Share Posted April 12, 2019 Hi @deemuss, Yes, it can be done with the jQuery code. You should go to the editing Authentication screen, where there are two fields - Name and Password, for example. Add header and footer element and HTML block. Put the following code to the header element for jQuery library: <script src="https://code.jquery.com/jquery-1.9.1.js"></script> Put the following code into the HTML block for the "Remember me" checkbox: <label class="checkbox"> <input type="checkbox" value="remember-me" id="remember_me"> Remember me </label> Put the following code into the footer element for the jQuery code: <script> $(function() { if (localStorage.chkbx && localStorage.chkbx != '') { $('#remember_me').attr('checked', 'checked'); $('#xip_Name').val(localStorage.usrname); $('#xip_Password').val(localStorage.pass); } else { $('#remember_me').removeAttr('checked'); $('#xip_Name').val(''); $('#xip_Password').val(''); } $('#remember_me').click(function() { if ($('#remember_me').is(':checked')) { // save username and password localStorage.usrname = $('#xip_Name').val(); localStorage.pass = $('#xip_Password').val(); localStorage.chkbx = $('#remember_me').val(); } else { localStorage.usrname = ''; localStorage.pass = ''; localStorage.chkbx = ''; } }); }); </script> where #xip_Name is an ID for the Name field and #xip_Password is an ID for the Password field. Please see this screenshot for better understanding: kpcollier and Vitalikssssss 2 Quote Link to comment Share on other sites More sharing options...
ClayG Posted November 3, 2021 Report Share Posted November 3, 2021 This is awesome! After testing it, I found that the password was saving, but not my username field. So I had to discover that my username field was called xip_Login_username in the browser rather than just #xip_Name, and after clearing bad cookie, it worked! Kurumi and kpcollier 2 Quote Link to comment Share on other sites More sharing options...
Kurumi Posted November 3, 2021 Report Share Posted November 3, 2021 Posting this for Form Elements reference Quote Link to comment Share on other sites More sharing options...
Cooper Posted October 19, 2022 Report Share Posted October 19, 2022 So, I've entered the coding that was provided in this forum into the authentication to add a "Remember Me" checkbox but it does not work. The datapage form works fine but a caspio rep said the checkbox needs to be done in my html coding. How do I connect the data page form and remember me checkbox on my web page so visitors do not have to fill out form everytime to go to next page on website? Not sure what to do or if anyone can help (if any of this makes sense) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.