Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Cannot save frontmatter fields with custom modal in Admin

admin

Started by Anna 7 years ago · 0 replies · 589 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 FrViPofm, 5 days ago
5 100 4 days ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2119 7 months ago
Forms & Blueprints · by Hugo Oliveira, 8 months ago
0 605 8 months ago
Forms & Blueprints · by Flachy Joe, 9 months ago
9 695 9 months ago
Forms & Blueprints · by Augustus, 10 months ago
7 741 10 months ago