I would like to track the contact form submissions in order to log field content into database. I would like to use the “avf_contact_form_submit_button_attr” filter. Could you please provide me the right syntax to address field content ?
Kind regards.
Jorge
Hey Jorge,
Thank you for the inquiry.
The form is using the default wp_mail function, so you can use the wp_mail_succeeded hook to add your own processes after successfully sending the mail. You can also use the avf_form_send filter, field data is saved in the $new_post parameter.
Example:
add_filter('avf_form_send', function( $proceed, $new_post, $params, $class ) {
// do something with $new_post data
return $proceed;
}, 10 , 4);
You can only use the avf_contact_form_submit_button_attr filter to adjust the attribute of the submit button.
Best regards,
Ismael
Hi Ismael,
I would like to thank you first for your help. It works fine now.
Please close this ticket.
Best regards.
Jorge
Hi,
Great, I’m glad that Ismael could help you out. I’ll close this thread for now then, please open a new thread if you should have any further questions or problems.
Best regards,
Rikard