Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When a validation error occurs on submitting a form the fields that are pre-populated are reset to their pre-populated values even if they've been edited. We should instead preserve the user's changes on validation.
Comment | File | Size | Author |
---|---|---|---|
#1 | prepopulate-[888974].patch | 699 bytes | mimrock |
Comments
Comment #1
mimrock CreditAttribution: mimrock commentedI've made a patch for that issue. The idea is that if the form is a submitted form, then we don't need prepopulate module, because the form's values are already in the form array
Comment #2
mimrock CreditAttribution: mimrock commentedComment #3
nocean CreditAttribution: nocean commentedPatch works perfectly! Cheers mimrock.
Comment #4
tumblingmug CreditAttribution: tumblingmug commentedMoreover, fields are reset when using the preview mode which causes data loss. (Title changed therefore.)
The patch from #1 solves this as well.
Comment #5
jbrauer CreditAttribution: jbrauer commentedClosing D6 issues as it's no longer supported.