Hi, lets say i am using this how i know it is work and how pass the data to my custom api (postman api)?
<?php
add_action( 'forminator_form_after_save_entry', 'my_function', 10, 1);
function my_function( $form_id ) {
$form_id = 381;
$entries = Forminator_API::get_entries($form_id);
}
Hi @jinyang123
Based on your forminator_form_after_save_entry, you are looking to send the data after the form submit, correctly?
If so, you can get the entry data, for example, let’s say you have the “Name-1” field you can use
$_POST[‘name-1’]; and get the data only for that submission, and then use the wp_remote_post() function https://developer.wordpress.org/apis/handbook/making-http-requests/posting-data-to-an-external-service/
If you are looking to send all entries you would use the same function wp_remote_post() passing your entries.
If you let us know what exactly you are looking to do ( like, send the latest post only ) we can make a small example.
This thread may help you https://wpmudev.com/forums/topic/forminator-pro-api-and-forminator/ just keep in mind that this thread is old and some hooks may got updated: https://wpmudev.com/docs/api-plugin-development/forminator-api-docs/#modified-or-deprecated-hooks
Best Regards
Patrick Freitas
Is that possible past you my whole wordpress and help me to link it?
Hi @jinyang123,
Is that possible past you my whole wordpress and help me to link it?
Could you please explain more about your query so that we can help you better?
Kind regards,
Zafer
Hello @jinyang123 ,
We haven’t heard from you for some time now, so it looks like you don’t need our assistance anymore.
Feel free to re-open this ticket if needed.
Kind regards
Kasia