Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
captcha
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
captcha
Merge requests
!95
Captcha disappears
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Captcha disappears
issue/captcha-3439550:3439550-captcha-disappears-on
into
2.x
Overview
0
Commits
1
Pipelines
1
Changes
1
Open
Rajan Kumar
requested to merge
issue/captcha-3439550:3439550-captcha-disappears-on
into
2.x
11 months ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
2.x
2.x (HEAD)
and
latest version
latest version
a8eeb950
1 commit,
11 months ago
1 file
+
3
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Element/Captcha.php
+
3
−
1
Options
@@ -91,7 +91,9 @@ class Captcha extends FormElement implements ContainerFactoryPluginInterface {
// Add JavaScript for general CAPTCHA functionality.
$element
[
'#attached'
][
'library'
][]
=
'captcha/base'
;
if
(
$form_state
->
getTriggeringElement
()
&&
isset
(
$form_state
->
getTriggeringElement
()[
'#limit_validation_errors'
])
&&
is_array
(
$form_state
->
getTriggeringElement
()[
'#limit_validation_errors'
]))
{
$triggering_element
=
$form_state
->
getTriggeringElement
();
$recalculate
=
!
empty
(
$triggering_element
[
'#recalculate'
]);
if
(
$triggering_element
&&
isset
(
$triggering_element
[
'#limit_validation_errors'
])
&&
is_array
(
$triggering_element
[
'#limit_validation_errors'
])
&&
!
$recalculate
)
{
// This is a partial (ajax) submission with limited validation. Do not
// change anything about the captcha element, assume that it will not
// update the captcha element, do not generate anything, which keeps the
Loading