getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
355 stars 227 forks source link

Support random default values for list child fields #2255

Closed xf- closed 2 years ago

xf- commented 2 years ago

At the moment, only fields key/value are supported and not a randomly named set of properties.

The trim function is needed, because the field name starts with a dot vs val is without a dot. The value is assigned in line 3 in list.twig.html (Line 3 is shouldn't be needed because fields.twig.html does the same thing. Check for null and assign default)