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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

How do I get the data from custom "Add Post" modal configured through admin

Started by Chris Lloyd 7 years ago · 3 replies · 648 views
7 years ago

I am following the very short example here where the documentation describes how to create an "Add Post" button that make adding a new blog post a little more streamlined for the end user. As soon as the user enters the blog post title then it loads a new page based on the blueprint / template you specified.

Once the user is on this page I want to pre-populate the blog title text field using the value the user entered in the modal before. Is this possible?

👍 1
7 years ago

Hi @Sockfuzz, here is a previous post (with examples) that should help: /forum/support/add-a-custom-page-creation-modal-for-modular-type-page-t3782?u=paulhibbitts

Let me know here if you need any more info etc.
Paul

7 years ago

Thank you for your response @paulhibbitts.

Can you tell me where I should be looking to see the example I need to answer my question? I followed the link you provided and read through your answer on that thread but I didn't see any example of how to take the title from the modal and use that to pre-populate a field in the page blueprint.

👍 1
7 years ago

I am not sure you could quite do that myself, but was hoping the example might lead you in a possible direction etc. I think what you are looking for might require a pretty simple plugin or theme PHP function but perhaps someone more of a developer here might share their thoughts🙂

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1138 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 62 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 136 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 110 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 130 7 months ago