I am having trouble with a Selectize field in a blueprint for the Admin (configured through a theme):
- custom values (not defined in the
selectize.options
) are erased in each subsequent save
This is the configuration I am using:
header.credits_people:
type: selectize
selectize:
options:
- text: "A"
value: "Person A"
- text: "B"
value: "Person B"
- text: "C"
value: "Person C"
- text: "D"
value: "Person D"
- text: "E"
value: "Person E"
label: People
validate:
type: commalist
Selectize filled BEFORE save: two values from selectize.options
, six custom values, two selectize.options
are not selected
AFTER first save (normal mode): first two custom values are missing
AFTER first save (expert mode): all values are still in the frontmatter
(changing from normal to expert mode without changing anything shows ‘Changes Detected’ dialog - weird!)
Saving in expert mode makes no changes to the list.
AFTER second save in normal mode: next two custom values are missing
expert mode still shows four custom values:
Each subsequent save in normal mode erases two custom values until I am left only with the three selectize.options
(A, B, C).
Other things I tried:
- if all 5
selectize.options
are selected- custom values are entered after
selectize.options
→ nothing is erased - custom values are entered before
selectize.options
→ custom values are erased, 5 at a time - custom values are entered after 3
selectize.options
, with 2 remainingselectize.options
after them → custom values are erased, 2 at a time
- custom values are entered after
Conclusion:
- if all
selectize.options
are selected and lead, no custom values are erased - otherwise the number of custom values erased is equal to the number of
selectize.options
not selected or the number ofselectize.options
that follow the custom values
Is there a mistake in my field configuration or other setting I should have changed?
(I am currently using Grav 1.7.9)
Thanks!, and sorry for the long post