Problem/Motivation

Antibot module will be installed by drupal_cms_starter and is configured to be used on e.g. user_login_form and also by drupal_cms_forms's contact form.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

arthur_lorenz created an issue. See original summary.

arthur_lorenz’s picture

Status: Active » Needs review

On Drupal side i think it's enough to expose the antibot key as a form attribute. The transformation of the key must be handled by the frontend.

useernamee’s picture

Status: Needs review » Needs work

Adding the antibot token to the form attributes should work. I'd just like to check again on conditions I don't think the first one is really necessary.

arthur_lorenz’s picture

Status: Needs work » Needs review

Thx, I removed the first condition.

fago’s picture

Title: Support antibot » Add support for antibot module
Status: Needs review » Needs work

lupus_decoupled_form is a generic module providing support for forms generically - it does not make sense for it to contain module specific things. That said, I wonder - https://git.drupalcode.org/project/antibot/-/blob/2.0.x/src/AntibotFormA... - is thtat data- attribute not handed over to the frontend? If so, that might be a *general* issue we should fix.

But looking at the anitbot module file, it seems there is a bit of more stuff we need to make sure we need to support, so we might want to add a lupus_decoupled_antibot module to make sure it works.

But the greater question is how to ship the frontend part. One way would be solving #3501615: Enabling loading Drupal JavaScript via support for drupal-libraries what I'd love to do asap, but might take us some time to get right.

A more straight-forward approach right now is to work-out a nice approach for having custom vue-components for drupal-cms deployed to the frontend. That will be needed for other things anyway. Then, we need this work with that, e.g. we could have some special drupal-antibot custom element which we ship that way + our integration module takes care of adding for those forms. Then the frontend component can take care of loading the Drupal antibot JS library and handling the necessary glue code.

arthur_lorenz’s picture

Status: Needs work » Postponed

I had another look at this.

is that data- attribute not handed over to the frontend?

The antibot key is not part of the data-attribute, it is put into the drupalSettings object only.

I agree we should move the current code lupus_decoupled_antibot and come up with a proper solution for FE. However, the main reason we wanted to support this was that it was part of Drupal CMS. Shortly before the release of 1.0.0 it got (temporarily?) thrown out due to a11y issues

Since there is no timeplan yet to re-add it to Drupal CMS I'll postpone this ticket.