If you are editing a form that has multi-valued fields, and you've added additional values (with "Add another item"), then those values will be dutifully autosaved by this module. However, when you come back to the form, the form will be built without the extra slots for values. Thus, the autosaved values will not be restored.
This patch fixes that by comparing the saved values to the form definition, in autosave_form_alter. It will add any slots that need to be filled.
This includes all my previous patches as well, sorry. Ask me if you want this feature split out.
That is, this patch also contains patches from:
#1364958: Dialog-based UI
#1365044: Forget autosaved form on successful submit
#855354: Javascript issues: unused global variable, vaguely named element DOM ids, should use Drupal.behaviors
#998694: CCK fields set to "allow unlimited" disappear when 'Add another option' is selected.
Comment | File | Size | Author |
---|---|---|---|
autosave-addanother.diff | 18.9 KB | galaxor |
Comments
Comment #1
David_Rothstein CreditAttribution: David_Rothstein at Tag1 Consulting commentedLooks like #1908264: Autosave adds only the first value in a multiple value field and doesn't work with many forms that rely on Ajax or $form_state is newer, but handles this too.