Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Cannot save frontmatter fields with custom modal in Admin

admin

Started by Anna 7 years ago · 0 replies · 709 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 Anna, 2 days ago
2 54 17 hours ago
Forms & Blueprints · by Anna, 3 days ago
7 82 17 hours ago
Forms & Blueprints · by Anna, 1 week ago
5 186 6 days ago
Forms & Blueprints · by TomW, 1 month ago
3 379 1 month ago
Forms & Blueprints · by Japhy, 2 months ago
2 595 2 months ago