I am using elementor wordpress plugin. I have made a form using elementor pro plugin. I want to get data when form is submitted and send an external api call with form data. I studied elementor documentation but did not found clear code sample. Is there is a way to send form data to external api.
After doing lot of research on elementor plugin. I got the solution. I add following hook in my custom plugin and it works.
add_action( 'wp_ajax_elementor_pro_forms_send_form', [ $this, 'ajax_send_form' ] );
add_action( 'wp_ajax_nopriv_elementor_pro_forms_send_form', [ $this, 'ajax_send_form' ] );
function ajax_send_form() {
// form processing code here
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With