mru2 / rails_form_autosave

Allows the user to navigate away from an unfinished form, and restore it's fields when coming back.

Home Page:https://rubygems.org/gems/rails_form_autosave

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails Form Autosave

This form allows a continuous saving of your forms, so that a user can navigate away from an unfinished form, and come back to the page later and have the form in the same state.

It works by saving the field contents in the session, so the lifetime of the saved forms is the same as the session’s.

Foreword

This gem is still in early beta. It is not recommended to use it in a production environment

Requirements

Jquery > 1.2

Installation

Add the gem to your Gemfile :

gem 'rails_form_autosave'

Copy the javascript assets

rails g rails_form_autosave:install

Include them in your application

<%= javascript_include_tag 'rails-form-autosave' %>

Usage

<%= form_for @user, :autosave => true %>
  ...
<% end %>

You can also use it this way

<%= form_tag search_path, :autosave => true, :autosave_id => "search_form" %>
  ...
<% end %>

Known Issues

Let us know :)

Coming soon

Formtastic support

About

Allows the user to navigate away from an unfinished form, and restore it's fields when coming back.

https://rubygems.org/gems/rails_form_autosave

License:MIT License


Languages

Language:Ruby 66.1%Language:JavaScript 33.9%