Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!9319
FormBuild docs
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
FormBuild docs
issue/drupal-2776661:2776661-incorrect-uses-of
into
11.x
Overview
0
Commits
4
Pipelines
5
Changes
1
Open
quietone
requested to merge
issue/drupal-2776661:2776661-incorrect-uses-of
into
11.x
8 months ago
Overview
0
Commits
4
Pipelines
5
Changes
1
Expand
Closes
#2776661
0
0
Merge request reports
Compare
11.x
version 4
b85e6d94
1 month ago
version 3
eedeb86e
2 months ago
version 2
765a3d14
2 months ago
version 1
d40e20c0
8 months ago
11.x (HEAD)
and
latest version
latest version
ceb626e6
4 commits,
1 month ago
version 4
b85e6d94
4 commits,
1 month ago
version 3
eedeb86e
3 commits,
2 months ago
version 2
765a3d14
2 commits,
2 months ago
version 1
d40e20c0
1 commit,
8 months ago
1 file
+
9
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
core/lib/Drupal/Core/Form/FormBuilder.php
+
9
−
9
Options
@@ -602,16 +602,16 @@ public function processForm($form_id, &$form, FormStateInterface &$form_state) {
return
;
}
// If $form_state->
i
sRebuild
ing(
)
h
as
been set
and input has been
// If $form_state->s
et
Rebuild
(TRUE
)
w
as
called
and input has been
// processed without validation errors, we are in a multi-step workflow
// that is not yet complete. A new $form needs to be constructed based
on
// the changes made to $form_state during this request.
Normally, a submit
//
handler sets $form_state->isRebuilding() if a fully executed form
//
requires another step. However, for forms that have not been fully
// executed
(e.g., Ajax submissions triggered by non-buttons), there is no
//
submit handler to set $form_state->isRebuilding(). It would not make
//
sense to redisplay the identical form without an error for the user to
//
correct, so
we also rebuild error-free non-executed forms, regardless
// that is not yet complete. A new $form needs to be constructed based
//
on
the changes made to $form_state during this request.
//
//
Typically, a submit handler calls $form_state->setRebuild(TRUE) when
//
a fully
executed
form requires another step. However, for forms that
//
have not been fully executed (e.g., AJAX submissions triggered by
//
non-buttons), there is no submit handler to call setRebuild(). In
//
that case,
we also rebuild error-free
,
non-executed forms, regardless
// of $form_state->isRebuilding().
// @todo Simplify this logic; considering Ajax and non-HTML front-ends,
// along with element-level #submit properties, it makes no sense to
Loading