Option "Hide textfields" also hides field label and description

Created on 11 January 2023, over 2 years ago
Updated 18 May 2025, 20 days ago

Problem/Motivation

Option Hide textfields also hides field label and description.

This line produces it: /src/Plugin/Field/FieldWidget/GeolocationMapWidgetBase.php:360

Proposed resolution

In GeolocationInput::processGeolocation() wrap lat and lng elements in container

    $element['coords'] = [
      '#type' => 'container',
      '#attributes' => [
        'class' => [
          'visually-hidden',
        ],
      ],
    ];

But it is impossible to get setting hide_textfield_form value here.

Workaround

Uncheck Hide textfields and hide text fields via CSS:

.geolocation-widget-input .form-type-textfield {
  display: none;
}
🐛 Bug report
Status

Closed: outdated

Version

3.0

Component

Javascript General / Frontend

Created by

🇷🇸Serbia super_romeo Belgrade

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