Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread How to implement a "Remember Me" on the login form
Fri, Oct 13 2017 5:02 AMPermanent Link

Paul Coshott

Avatar

Hi All,

I would like to add a "Remember Me" check box on my login form for the user name. Could someone point me in the right direction in the manual to what I need to store the user name locally.

Thanks,
Paul
Fri, Oct 13 2017 6:46 AMPermanent Link

Matthew Jones



   LocalStorage.Set('itemname', 'mydata');
   szMyData := LocalStorage.Items['itemname'];

You can look up the other options from that. You can also get fancy, and store complex things by storing JSON or other such strings.

--

Matthew Jones
Fri, Oct 13 2017 7:05 AMPermanent Link

Walter Matte

Tactical Business Corporation

Just want to mention....

You can also use cookies - TCookies in help.

There is a global instance variable of the class called Cookies - that can be used.

There are lots of posts online if you want to learn more about Cookies vs LocalStorage.

Walter
Fri, Oct 13 2017 9:59 AMPermanent Link

Paul Coshott

Avatar

Hi Guys,

Excellent, thanks. Got it fully working in about 10 minutes! Too easy!

Cheers,
Paul
Image