Skip to content
Grav 2.0 is officially stable. Read the announcement →
Forms & Blueprints

Cannot save frontmatter fields with custom modal in Admin

admin

Started by Anna 7 years ago · 0 replies · 552 views
7 years ago

Hello everybody,

I have a custom page type (event) that I made a custom modal page creation form in Admin for, almost exactly as described in the docs. It works well so far, but I would like to add some frontmatter fields to it since that is where most of the event information is stored.

However, while I can add those fields alright and fill them out, they do not get saved. After clicking "continue" I am taken to basically the same form with the title filled out and the fields that should have been saved as frontmatter empty.

I have noticed that the page creation modal does not seem to actually create the page – that seems to happen only after clicking save in the second form. That does explain why I can't save frontmatter before that :-) however, this is not what I want. I would like an easy way of creating new events in one step. If I can't do that with the modal, I really would like to skip that step altogether and have a button that takes me to a new event creation page straight away. Does anybody know how to achieve this? Either have a modal that actually creates a folder and file, or else be taken to a nonmodal page creation form directly?

Thank you for your ideas!

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 1863 6 months ago
Forms & Blueprints · by Hugo Oliveira, 7 months ago
0 451 7 months ago
Forms & Blueprints · by Flachy Joe, 8 months ago
9 548 8 months ago
Forms & Blueprints · by Augustus, 9 months ago
7 570 9 months ago
Forms & Blueprints · by Julien, 9 months ago
10 590 9 months ago