- π§πͺBelgium svendecabooter Gent
Use case would be having a specific module that generates its form_id dynamically, or has a lot of forms with different IDs.
In the first case, the administrator could not enable Antibot for these forms, since they cannot add all dynamically generated form IDs to the antibot settings. In the second case, they would need to add a lot of form IDs manually.Providing a hook would solve this issue, if the specific module would implement this hook and provide its form_ids to it. This would automatically enable Antibot on all of the forms by "specific module", without a site administrator having to configure something.
Ideally the hook would not alter the form_ids, but just decide whether the form_id the hook is called for, should use Antibot or not.
That way, the specific module could just return TRUE for all form_ids starting with e.g. "specific_form_" - First commit to issue fork.
- Merge request !13Implementing the hook_antibot_form_status_alter and adding doccumentation how to use it β (Open) created by paulocs
- Status changed to Needs review
almost 2 years ago 12:05am 8 March 2023 - π§π·Brazil paulocs Belo Horizonte
I have created a PR to create the hook. I think we can add the hook as @svendecabooter provided some useful use cases.
- Status changed to RTBC
almost 2 years ago 12:19pm 9 March 2023 - π§π·Brazil hmendes
Thanks @paulocs.
Tested the code here locally and it worked for me. I did a simple implementation on a custom module setting the protection to TRUE on a specific form and it worked.Tested with Drupal 9.5.1 and antibot 2.0.x-dev. Changing to RTBC.
- π«π·France xavier.masson Haute-Normandie
xavier.masson β made their first commit to this issueβs fork.
- Status changed to Needs review
3 months ago 4:15pm 6 September 2024 - π«π·France xavier.masson Haute-Normandie
I've rebased the MR !13 with latest version of 2.0.x, i've needed to adapt the previous code from changes of 2.0.x branch, any to review ?