width value and label do not match

Created on 3 August 2021, about 3 years ago
Updated 19 January 2023, over 1 year ago

Problem/Motivation

The value options for the width do not match what the displayed value label states for Bootstrap Horizontal Form.
$form['width'] = [
      '#title' => $this->t('Label width'),
      '#type' => 'select',
      '#options' => range(1,11),
      '#default_value' => $this->getSetting('width'),
    ];

results in

<option value="0">1</option>
<option value="1">2</option>
<option value="2">3</option>
...

Steps to reproduce

Edit the field group settings and view the saved settings.

Proposed resolution

Provide the full value array set for the options as

[
1 => 1,
2 => 2,
3 => 3,
4 => 4,
5 => 5,
6 => 6,
7 => 7,
8 => 8,
9 => 9,
10 => 10,
11 => 11,
]

Remaining tasks

Change the form options

πŸ› Bug report
Status

Fixed

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States shelane

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.

No activities found.

Production build 0.71.5 2024