Problem/Motivation

When having multiple forms on a page with data attributes that have the same name as the search form (eg. edit-query), the javascript does not get the value from the AI search form.

Steps to reproduce

1. Add AI search form block to a page
2. Add a new (custom) form with the same data attributes and render it before the AI search form.
3. Try to do a search and check if all the values are set (this won't be the case)

Proposed resolution

Use the available $form element to get the values.

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

jonas139 created an issue. See original summary.

jonas139’s picture

Status: Active » Needs review
arianraeesi’s picture

nikro’s picture

Assigned: Unassigned » nikro
nikro’s picture

Checking deeper into this - I realized that if we merge https://www.drupal.org/project/ai_search_block/issues/3523017 (a bit more ambitious MR) -> then this will be automatically solved (because we account there for multiple forms / blocks on the same page).

nikro’s picture

Assigned: nikro » Unassigned

I'm suggesting to mark this as a duplicate and for someone to 'redirect' their attention to the issue specified here: https://www.drupal.org/project/ai_search_block/issues/3523017

Need someone's 2nd opinion on that :) if you agree -> mark as duplicate.