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

Ajax form plugin submit without page refresh and capture in plugin.php

Started by Matt Jones 7 years ago · 0 replies · 669 views
7 years ago

Hi, I am new to grav, php and ajax so its a steep learning curve for me. I am trying to create a plugin which has a form (At the moment this form is just defined in the twig template), which is submitted using ajax:
https://learn.getgrav.org/15/forms/forms/how-to-ajax-submission
I need to capture the form data within the plugins php, I have tried using onFormProcessed event with no luck.
I have seen this previous post about ajax and plugins but I need more help.

Where and how should i capture the ajax form data?

Also, capturing the $_POST the traditional way in pageInitialize with a page refresh was working correctly.

last edited 03/30/19 by Matt Jones

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Vladimir Novak, 2 weeks ago
3 294 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 277 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 403 2 months ago
Plugins · by Rene, 2 months ago
2 574 2 months ago
Plugins · by Xavier, 3 months ago
2 490 3 months ago