Hi @fantou
Thank you further details, It is more clear now.
We have different ways here, let me try to cover them so you can decide which fits better your need.
– Via Backend:
You can use some Forminator hooks, for example, if you want to trigger something after Forminator save the data in database you can use:
$entry = Forminator_Form_Entry_Model::get_latest_entry_by_form_id( $form_id );
along
add_action ( 'forminator_form_after_handle_submit', 'function_name', 10, 2 );
add_action( 'forminator_form_after_save_entry', 'function_name', 10, 2 );
Params $form_id and $response
In app.mysite.com needs to have a POST endpoint to receive that data, you can use wp_remote_post function.
– Via front end
The API postMessage() can work in this case, you can trigger the Post message after the form submit, I believe the event described here https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#form-data-not-sent-to-gtm can help you. But I see this method would be too weak depending on your needs, the backend approach is a better idea.
– Via Webhook, Similar to first option you would need the app. to have an POST endpoint to receive the event request, the benefit of this approach is you don’t need to worry with the Form as it will trigger the data out of box, you just need to worry on building your endpoint.
You can test webhook data using https://webhook.site/
With that said, as Imran mentioned, creating the code would be beyond our support scope, but I believe the above gives you a better idea to how to proceed.
Best Regards
Patrick Freitas