v2-hub
v2-hub copied to clipboard
a suggest fieldtype after a section fieldtype inside a grid fieldtype doesn't display
Describe the bug
When you have a suggest
fieldtype inside a grid
, if you put it after a section
fieldtype, the field doesn't display (the label still shows).
If you move the field before the section
it displays fine.
NB sections are possibly odd in grids but they are very useful in stacked mode with complicated fieldsets
To Reproduce
User this yaml
:
tab:
display: Stuff
fields:
stuff:
mode: stacked
min_rows: 1
add_row: 'Add stuff'
fields:
a_section:
type: section
display: 'I'm a section'
a_field:
type: text
display: 'I'm a field'
things:
options:
one: 'Option One'
two: 'Option Two'
three: 'Option Three'
create: true
type: suggest
display: 'Select things'
Expected behaviour Should work wherever they are placed
v2.11.3
I have the same issue, but it happens just by having the suggest
fieldtype in a grid in a different section (tab) than main.
title: Footer
hide: true
sections:
main:
display: General
fields:
columns:
type: replicator
display: Columns
localizable: true
sets:
column:
display: Column
fields:
headline:
type: text
display: Headline
validate: required|string
columns:
type: grid
display: Columns
min_rows: 1
add_row: Column
fields:
content:
type: bard
display: Content
buttons:
- h2
- h3
- bold
- italic
- unorderedlist
- orderedlist
- anchor
- removeformat
allow_internal_links: true
validate: required|string
hotels:
display: Hotels
fields:
hotels:
type: grid
display: Hotels
add_row: Hotel
mode: stacked
localizable: true
fields:
hotel:
type: suggest
display: Hotel
mode: Hotels
max_items: 1
validate: required|string
columns:
type: replicator
display: Columns
localizable: true
sets:
column:
display: Column
fields:
headline:
type: text
display: Headline
validate: required|string
columns:
type: grid
display: Columns
min_rows: 1
add_row: Column
fields:
content:
type: bard
display: Content
buttons:
- h2
- h3
- bold
- italic
- unorderedlist
- orderedlist
- anchor
- removeformat
allow_internal_links: true
validate: required|string