FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding 'Remember me' to a form
#1
Has anyone had any success in adding a 'remember me' element to their forms? I'm trying to figure out how I could do this.

I'm trying to emulate the functionality of a commercial hosted form solution that I've used before. In this case what 'remember me' does is automatically populate name, contact details etc. so if the user is submitting multiple forms (with different content) they don't have to keep re-typing their name etc.

Any suggestions are welcome.

Thanks

Martin
Reply
#2
Terrific idea. I can certainly see how this could be helpful.

A little information first. Form integration via the API is handled via sessions (database or PHP). When the user first arrives at the form, it reserves a unique record ID for the form, then keeps track of info as the user progresses through the form. On the final page it submits the content for that unique ID and empties sessions.

So at that point, all data is emptied. If they return to the form at that point, a new submission ID is reserved and they start anew. The trick will be to circumvent this and tell it to remember certain field values.

One hack solution would be to do this: on the final page, right before emptying sessions, store the fields you want in a temporary array. Then empty sessions (ft_api_clear_form_sessions()). Then, store the fields back in the $_SESSION var. Finally, on the first page of your form, after the ft_api_init_form_page() call, check the return value to see if $fields contains empty values for some of the form fields (e.g. the required ones). If it's empty, stick the values from $_SESSION back into that var.

Hack? Yup.

I'll put this down as a feature request. It would nice to have this as a built-in option.

- Ben
Reply
#3
Thanks Ben. I was originally thinking that I might be able to achieve this using a cookie but your suggestion seems cleaner.

I'll have a crack at this and see how I go!
Reply
#4
(Nov 8th, 2009, 12:31 PM)martin_undefined Wrote: Thanks Ben. I was originally thinking that I might be able to achieve this using a cookie but your suggestion seems cleaner.

I'll have a crack at this and see how I go!

Hi Martin,

Did you get that 'remember me' feature working? I would be interested in using that feature :-)
Reply
#5
No, I had not actually but my friends did that once. If you want any assistance regarding this title then visit essay writing services reviews here he is working and delighting his work because he is working as freelancers for earnings.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)