PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Feature Suggestion: Local Storage (Sisyphus)

  1. 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
    Posted 9 years ago on Thursday December 15, 2011 | Permalink
  2. I ran across this today:

    http://simsalabim.github.com/sisyphus/

    Same thing I know, perhaps updated. Any Plans for Gravity Forms to implement this functionality?

    Posted 9 years ago on Thursday April 19, 2012 | Permalink
  3. I'd like to post a third request for this. It would be great. Wish Gravity Forms included something like this.

    Posted 8 years ago on Wednesday September 12, 2012 | Permalink
  4. yup would be great especially when you could then use this for multi-page or long-page questionaires

    Posted 8 years ago on Thursday September 27, 2012 | Permalink
  5. kcbluegal
    Member

    Another request for this please.

    Posted 8 years ago on Friday May 10, 2013 | Permalink
  6. kcbluegal
    Member

    I managed to get this working!

    This goes in your theme's functions.php file (mine went straight on the bottom)

    wp_register_script ( // sisyphus
              'sisyphus',
              get_template_directory_uri() . '/js/sisyphus.min.js',
              array('jquery'), //requires jQuery
              1.1, //Version Nr
              false //loads in footer
            );
    
    }
    }
    add_action('wp_enqueue_scripts', 'my_init_method');
    
    function register_all_styles()
    {
    wp_enqueue_script( 'sisyphus' ); // Enqueue sisyphus
    }
    add_action('wp_enqueue_scripts','register_all_styles');

    I then used the PureHTML plugin and used the first code from above:

    <script type="text/javascript">
    jQuery(document).ready(function() {
    	jQuery('#gform_8').sisyphus({}); //replace with your form id
    });
    </script>

    Then I used the short code generated by PureHTML so now my post looks like this:

    [purehtml id=1]
    [gravityform id="8" name="Success Check Form"]
    Posted 8 years ago on Saturday May 11, 2013 | Permalink
  7. David Peralty

    That's great, thanks for posting!

    Posted 8 years ago on Saturday May 11, 2013 | Permalink
  8. bhays
    Member

    I needed to do this same thing for a couple of clients so I ended up writing a plugin that adds Sisyphus on a per-form basis.

    I'm in the process of getting it added to the WordPress Plugins Repository, so in the meantime you can grab the plugin here: https://github.com/bhays/gravity-forms-sisyphus

    Posted 8 years ago on Monday May 13, 2013 | Permalink
  9. David Peralty

    That's great bhays, looking forward to it!

    Posted 8 years ago on Monday May 13, 2013 | Permalink