A L
2012-Jun-27 23:44 UTC
form_for reset button doesn''t get updated to new form values after AJAX update
Hi, I''m trying to use the form_for reset button: <%= button_tag ''Reset'', :type => ''reset'' %> It works great, but when I update the object through AJAX, how can I get the new form values to be the ones reset to? Right now it resets to the values when the document loads, which makes sense. But is there a way to get the reset button to register the new values? <https://github.com/rails/jquery-ujs/issues/265#issuecomment-6616407> Here''s the code: https://gist.github.com/3006966 Thank you for your time! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/PJ8hP6IopGQJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.
A L
2012-Jun-27 23:49 UTC
Re: form_for reset button doesn''t get updated to new form values after AJAX update
And hopefully something simpler than looping through all the fields and manually setting their default values: http://stackoverflow.com/questions/8767048/how-can-i-update-a-default-value-for-a-form-field-after-an-ajax-submission-not -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/hzhP8CvvmyYJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.