- Issue created by @EgbertB
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
I would expect that that something like Honeypot would solve this. But I have not tested to see if this works out of the box.
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Quickly checked and Honypot seems to be working for anonymous users when you select "protect all forms".
No checkboxes are shown to specifically enable Poll forms, so we might look into that in the future.
- 🇳🇱Netherlands EgbertB
This works
function [hook]_form_alter(&$form, &$form_state, $form_id)
{
if(strpos($form_id, "poll_view_form") !== false){
\Drupal::service('honeypot')->addFormProtection($form, $form_state, array('honeypot', 'time_restriction'));
}
}