Skip to content

Allow form resubmit on validation error. - #626

Open
Xaratas wants to merge 1 commit into
getgrav:developfrom
Xaratas:develop
Open

Allow form resubmit on validation error.#626
Xaratas wants to merge 1 commit into
getgrav:developfrom
Xaratas:develop

Conversation

@Xaratas

@Xaratas Xaratas commented Feb 17, 2026

Copy link
Copy Markdown

Problem: If the plugins.form.refresh_prevention setting is set the form will reset the same unique id, and thus find out if it is a secondary submit.
If the form has fields that need to be validated, and the validation returns errors, this very same unique id prevents the user to resend the form with corrected data.

So this change checks, if the validation has indeed flagged the form as invalid and if so does not overwrite the already newly generated unique id. Thus allowing to resubmit the form on validation errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant