Untitled
unknown
plain_text
a year ago
470 B
3
Indexable
use Drupal\captcha\CaptchaPointInterface; /** * Implements hook_form_alter(). */ function my_module_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { // Replace 'your_custom_form_id' with the actual form ID of your custom contact form. if ($form_id == 'your_custom_form_id') { // Set the CAPTCHA type for the form. $form['captcha'] = [ '#type' => 'captcha', '#captcha_type' => 'image_captcha/Image', ]; } }
Editor is loading...
Leave a Comment