getgrav / getgrav/grav-plugin-form
Elements field not saving data of element
- Dominant language
- PHP
- Stars
- 64
- Forks
- 80
- Avg merge
- 10h 13m
- Merged PRs (30d)
- 9
Description
Using fresh Grav v1.7.29.1 install, I've created a blueprint in Quark using a copy of the demo from the docs on [Elements Field](https://learn.getgrav.org/17/forms/blueprints/fields-available#elements-field). However, the values of the chosen element are not being saved.
**user/themes/quark/blueprints/elements.yaml**
```
title: Elements
'@extends':
type: default
form:
fields:
tabs:
type: tabs
active: 1
fields:
links:
type: tab
title: Elements
fields:
# Rest is copied straight from the docs
header.elements-demo:
type: elements
label: 'Elements Demo'
size: small
default: gelato
options:
gelato: Gelato Flavors
color: Color
planets: Planets
fields:
gelato:
type: element
fields:
.items:
type: array
default:
pistacchio: Pistacchio
vanilla: Vanilla
chocolate: Chocolate
stracciatella: Stracciatella
color:
type: element
fields:
.items:
type: textarea
rows: 10
default: Color (American English) or colour (Commonwealth English) is the visual perceptual property corresponding in humans to the categories called blue, green, red, etc. Color derives from the spectrum of light (distribution of light power versus wavelength) interacting in the eye with the spectral sensitivities of the light receptors. Color categories and physical specifications of color are also associated with objects or materials based on their physical properties such as light absorption, reflection, or emission spectra. By defining a color space colors can be identified numerically by their coordinates.
planets:
type: element
fields:
.items:
type: text
placeholder: What are your favorite planets?
markdown: true
description: 'Find a list of planets from [Wikipedia](https://en.wikipedia.org/wiki/Planet)'
```
When creating a new page based on the blueprint, only the following, depending on the chosen element, is being saved in the page:
**user/pages/03.elemens/elements.md**
```
---
title: Elements
elements-demo: gelato
---
```
-or-
```
title: 'Elements'
elements-demo: color
```
-or-
```
---
title: Elements
elements-demo: planets
---
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.