Save the formhook.php file to apps/test/handlers/formhook.php
then add this to the [Hooks]
section of conf/config.php
:
form/submitted[] = test/formhook
Create a form and enter a test submission through it on the website (I just embed it on a page with the Dynamic Objects > Embed a Form option in the wysiwyg editor). You should see something like the following in cache/_form_values_.txt
:
{"form":"1","values":{"name":"Joe User","email":"joe@example.com","comments":"Testing."}}