This topic is locked

Auto-Save

10/19/2017 5:10:16 PM
PHPRunner General questions
T
thudsen author

Hi
I've finally published and am using a rather complex database created with PHPR for a healthcare/therapy system. All working very well.
I've had a few doctors and nurses asking if there is anything I can do with auto-saving. Where they have a record open, after 20 minutes it times out. This is good as we do not want unauthorised users opening files. However, if they have half completed as record then what they have entered is lost.
I've tried implementing a javascript onto the page to autosave the contents, like that suggested on xlinesoft blog - How to implement auto-save feature but it doesn't seem to work with version 9.8. Anybody got any ideas or simple solutions?
Thanks
Terry

jadachDevClub member 10/19/2017

Personally, I think the best option is on add page after saving - go to the new record in edit mode. On edit page after saving - stay on edit page.
This obviously forces the user to save before walking away, but in my opinion, this is something they need to do. No different that saving a word document often as you work on it.

T
thudsen author 10/19/2017



Personally, I think the best option is on add page after saving - go to the new record in edit mode. On edit page after saving - stay on edit page.
This obviously forces the user to save before walking away, but in my opinion, this is something they need to do. No different that saving a word document often as you work on it.


I agree. Unfortunately if they spend 20 mins in the office asking the patients questions or examination then it could still log them out.

jadachDevClub member 10/19/2017

I feel your pain. I work in a hospital. Tough crowd at times <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=83530&image=1&table=forumreplies' class='bbc_emoticon' alt=':blink:' />

HJB 10/20/2017

@hudster

https://xlinesoft.com/blog/2014/05/19/how-to-implement-auto-save-feature/

..., for inspiration purposes purposes only.
P.S. Citing excerpt: http://asprunner.com/forums/topic/20684-auto-save-in-php-runner/
In a very simple form you can make your Save button to be clicked once every few seconds or minutes.
To do so add the following code to Javascript onload event of the Edit page:

setTimeout(function() {

$("#saveButton1").trigger('click');

}, 5000);
I have to add that this will be a terrible usability issue if not done right. Proper implementation need to save data behind the scene and, best of all, in a temporary table/record. Unfortunately there is no 'one size fits all' solution here. It all depends on what your application details and how people use it.

T
thudsen author 10/20/2017



@hudster

https://xlinesoft.com/blog/2014/05/19/how-to-implement-auto-save-feature/

..., for inspiration purposes purposes only.
P.S. Citing excerpt: http://asprunner.com/forums/topic/20684-auto-save-in-php-runner/
In a very simple form you can make your Save button to be clicked once every few seconds or minutes.
To do so add the following code to Javascript onload event of the Edit page:

setTimeout(function() {

$("#saveButton1").trigger('click');

}, 5000);
I have to add that this will be a terrible usability issue if not done right. Proper implementation need to save data behind the scene and, best of all, in a temporary table/record. Unfortunately there is no 'one size fits all' solution here. It all depends on what your application details and how people use it.


Thanks - I'd looked at the inspiration - that's the one I cannot get to work. It's only 1 page that would need to autosave and we only have 2 concurrent users for this, who only deal with 6 patients per day, so the javascript code you have suggested would work.
jadach - i like the idea of switching it to an edit page and staying on that rather than closing - might encourage them to press the save button more.
Thanks guys

HJB 10/20/2017

https://xlinesoft.com/blog/2014/12/19/how-to-split-addedit-pages-into-several-subpages/
Citing excerpt: Fairly often we want to split long forms into several steps letting users fill a few fields on each step. Besides making a long form easier to fill out for your users you can also save partial results between pages. Unquote
A mix out of multi-step pages (under custom view) and per step oriented SAVING of data, say, might be a compromise anyway ...

T
thudsen author 10/20/2017



https://xlinesoft.com/blog/2014/12/19/how-to-split-addedit-pages-into-several-subpages/
Citing excerpt: Fairly often we want to split long forms into several steps letting users fill a few fields on each step. Besides making a long form easier to fill out for your users you can also save partial results between pages. Unquote
A mix out of multi-step pages (under custom view) and per step oriented SAVING of data, say, might be a compromise anyway ...


Good thinking there. I use multistep/tabbed pages at present, but the save button is always on the final step. Could add to each page.
Thanks