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

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.