Add theme suggestions for form elements

Created on 16 November 2021, about 3 years ago
Updated 3 February 2023, almost 2 years ago

Problem/Motivation

It is difficult to theme the inputs in this form separately from other search forms.
I'd like to be able to add a unique theme suggestion to both the search input and the submit button.

The default theme hook for the search input is input__search
and the default theme hook for the search submit input is input__submit

These are the same as any other search input which may be on the page.

Steps to reproduce

The theme_hook_original can be seen in $variables inside a hook_theme_suggestions_input_alter()

Proposed resolution

There is an open issue to add "context" to form elements, see ✨ Add a "context" array variable to all theme hooks and "#context" array property to all elements to provide optional contextual data Needs work

However in the meantime adding another suggestion to the form elements here would make it easier to theme these inputs separately from any other submit or input type="search".

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States zrpnr UTC-7

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024