Sisyphus (Demo Page and GitHub) is a jQuery plugin that uses Local Storage to prevent form entries from being lost due to closed, crashed, etc browser windows.
It would be stellar to have this - or a feature set like it - built out as a native option / part of solution for Gravity Forms.
For those wanting to try Sisyphus themselves, the following code can be added to your functions.php file after uploading the minified JS to your theme folder /js/ subfolder:
wp_register_script('sisyphus',
get_stylesheet_directory_uri() . '/js/sisyphus.min.js',
array('jquery'),
'1.0' );
and then in a page template that your forms use add the following:
<script type="text/javascript">
jQuery(document).ready(function() {
//jQuery('#gform_1').sisyphus({});
});
</script>
The GF documentation also indicates that gform_enqueue_scripts is another method to be form specific if you wish to in a similar fashion.
In both cases with the setup I'm trying it out on (WP 3.2, GF 1.6.1) I am getting JS errors in console from sisyphus. Haven't looked in detail as to whether these are items specific to Sisphus or mixture based on how GF generates forms and Sisyphus is trying to enable itself:
- Calling it default parameters gets a "can't convert null to object" from jQuery 1.6.1
- Setting excludeFields: jQuery( ".datepicker" ) parameter mitigates that and does allow the functionality of local storage to operate, but still gets an "a.attr("name") is undefined" error from Sisyphus