Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
clientside_validation
Commits
e33f4958
Commit
e33f4958
authored
Nov 16, 2012
by
Jelle Sebreghts
Browse files
Issue #1817004 by Akshita: Added Support captcha for webform.
parent
9c29efa6
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside_validation_webform/clientside_validation_webform.module
View file @
e33f4958
...
...
@@ -118,6 +118,14 @@ function clientside_validation_webform_after_build_recurse($form_id, &$form, &$f
}
}
}
if
(
isset
(
$element
[
'#type'
])
&&
$element
[
'#type'
]
==
'captcha'
)
{
$settings
=
clientside_validation_settings_current_form
();
if
(
$settings
[
'validate_options'
][
'captcha'
])
{
$title
=
_clientside_validation_set_title
(
isset
(
$element
[
'captcha_widgets'
][
'captcha_response'
][
'#title'
])
?
$element
[
'captcha_widgets'
][
'captcha_response'
][
'#title'
]
:
$element
[
'#name'
]);
$message
=
t
(
'Wrong answer for !title'
,
array
(
'!title'
=>
$title
));
_clientside_validation_set_captcha
(
$element
[
'captcha_widgets'
][
'captcha_response'
][
'#name'
],
$title
,
$element
[
'#captcha_validate'
],
$js_rules
,
$message
);
}
}
clientside_validation_webform_after_build_recurse
(
$form_id
,
$element
,
$form_state
,
$js_rules
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment