Select Option Groups

Created on 27 July 2022, almost 2 years ago
Updated 11 June 2024, 16 days ago

Problem/Motivation

I want to make a form with a select, with option groups

Steps to reproduce

heres my yaml code (found out how to do this from other issues in this queue)

test:
  '#type': select
  '#title': Test
  '#options':
    'Opt Group 1': 
    'something else': 'something else'
    'another thing': 'another thing'
    'Opt Group 2': 
    'yet something else': 'yet something else'
    'yet another thing': 'yet another thing'
  '#empty_option': 'please select'

however when I save it it becomes (I guess the parser is doing this).

test:
  '#type': select
  '#title': Test
  '#options':
    'Opt Group 1': null
    'something else': 'something else'
    'another thing': 'another thing'
    'Opt Group 2': null
    'yet something else': 'yet something else'
    'yet another thing': 'yet another thing'
  '#empty_option': 'please select'

And then the Opt Group 1 (&2) become standard options.. am I missing something?

πŸ› Bug report
Status

Closed: works as designed

Version

6.1

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom benjarlett

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.69.0 2024