guillaumepotier / Garlic.js

Automatically persist your forms' text and select field values locally, until the form is submitted.
http://garlicjs.org/
Other
2.36k stars 176 forks source link

Force saving of a hidden field #114

Open turgs opened 6 years ago

turgs commented 6 years ago

Similar to Issue 113, I'm trying to track the timestamp of when draft was last edited.

I can't find a way for garlicjs to do that for me, so I'm trying to roll my own in a hidden field, and have garlicjs save it just like any other field.

But hidden fields seem to be excluded. So I've tried to make it a normal text field, but with CSS "display:none", but it doesn't get saved because the user never gives the field focus.

Is there a way to overcome this type of scenario?