Commit e33f4958 authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

Issue #1817004 by Akshita: Added Support captcha for webform.

parent 9c29efa6
......@@ -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);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment