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.

CommentFileSizeAuthor
#1 prepopulate-[888974].patch699 bytesmimrock
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mimrock’s picture

Status: Active » Patch (to be ported)
FileSize
699 bytes

I'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

mimrock’s picture

Status: Patch (to be ported) » Needs review
nocean’s picture

Patch works perfectly! Cheers mimrock.

tumblingmug’s picture

Title: Validation errors on forms cause fields to be reset » Form validation errors or using Preview mode cause fields to be reset
Version: » 6.x-2.2

Moreover, fields are reset when using the preview mode which causes data loss. (Title changed therefore.)
The patch from #1 solves this as well.

jbrauer’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Closing D6 issues as it's no longer supported.