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 · 561 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 Rene, 1 week ago
2 75 1 week ago
Plugins · by Xavier, 4 weeks ago
2 81 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1208 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 75 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 99 2 months ago