Hi Thomas,
I can think of several ways to do this but I’d probably do it all using cookies and JavaScript like this;
Set a cookie of the user’s machine that holds the form data until the form is submitted. You’d need to add some JavaScript to the page that looks for key events or blur events on each form item and writes or updates a cookie with the form values. Once the form is sent (maybe on the thank you page) you’d have another block of JavaScript that clears the cookie data. Lastly on the form page itself you’d have another block of JavaScript that looks for the cookie and populates the form values from the settings stored in the cookie. This way the form data should persist until the form is sent (or until the cookie expires).
Regards,
Tim.
On 20 Sep 2013, at 08:11, Thomas Kimmich wrote:
got a lil thing in my german forum board where I honestly am more than blank with a suitable answer. It should be read as:
“Is it possible to keep the entries of a form-field even the user is leaving the page coming back later?”
The form is done with Tim’s PHP Feedback form (as far as I am oriented).
I totally understood what you mean and how this would work (and I even was convinced that this is the way).
The bad one:
I can’t write not even one line of JavaScript code nor do I know how to set a cookie on users’ machine.
But I will have a google or is there something you could point me to. Learning JavaScript is (after all that InlineConstruction stuff) probably the next I should have a closer look into - probably.
On 20 Sep 2013, at 13:47, Thomas Kimmich email@hidden wrote:
Hi Tim,
the good news:
I totally understood what you mean and how this would work (and I even was convinced that this is the way).
The bad one:
I can’t write not even one line of JavaScript code nor do I know how to set a cookie on users’ machine.
But I will have a google or is there something you could point me to. Learning JavaScript is (after all that InlineConstruction stuff) probably the next I should have a closer look into - probably.
Hi Joe,
That was one of the other ways I thought this could be done although, as you imply, support would be somewhat limited to fairly recent browsers.
I didn’t do the original example in Freeway, but here’s one you can download for dissection. You will need the Protaculous 2 Action to use this. I made a few improvements over the original in the process – it will handle any type of form control, and the reset takes whatever the default value is for the field, it doesn’t just wipe the field to empty.
Path to cookiejar script points to a cdn, which will mean that it is consistent or do I have to save the script local?
Another more strange point:
I had several problems with my beloved CrowBar and unfortunately with the Protaculous2 as well (nearby similar).
Both are not keeping their values as expected. In CrowBar, I recognized, that it ignores alterations when scripts are already applied and even disconnects master/child or even resets the content to empty.
Something similar happened on the above memo page example. If I make simple changes such as moving the position of the table, the function part in the DOM Loaded Observer is reset to simply empty.
Naturally strange to point you to any example or to describe it more precisely - it is simply a “hmmmm?”
I can’t repeat that here. Do you have any other Actions on the same page, or are you just opening my memo.freeway page and experimenting there? I’m using Freeway 6.1.0 here.
Walter
On Sep 24, 2013, at 3:16 AM, Thomas Kimmich wrote:
Something similar happened on the above memo page example. If I make simple changes such as moving the position of the table, the function part in the DOM Loaded Observer is reset to simply empty.
Also, did you download and install the most recent version of Protaculous 2? There will be an embedded copy in the document, and it should work, but it’s always best to install Actions before you open a document that needs them.
Walter
PS: Yes, the CDN address should remain stable for a very long time.
On Sep 24, 2013, at 3:16 AM, Thomas Kimmich wrote:
Something similar happened on the above memo page example. If I make simple changes such as moving the position of the table, the function part in the DOM Loaded Observer is reset to simply empty.
Don’t be. Each time the form element observes a keyup event, the cookie is updated. This is the sort of live-save behavior you may recognize from iPad or the online iWork suite.
Walter
On Sep 27, 2013, at 10:31 AM, Thomas Kimmich wrote:
Sorry for my ignorance Walter,
but I still haven’t got the gist how the cookies are set.
Am I correct that it is by hitting send or is it an automatic process that I miss?
Aha - OK, so reflector.php is NOT required for running, it’s just the “result” of collecting? And reset cookies could be also something like “Clear Form”?
I gave this further to the original poster on my forum, but it didn’t seem to work for whatever reason. I have to investigate this probably myself cause I don’t trust things I have not in my hands (if I find a bit of time).