Tagged: CONTACT FORM, filter
I am trying to hook into contact form and change the action URL by adding the following code to my functions.php file. I can’t seem to figure out what I’m doing wrong here.
If i edit the array directly in \enfold\config-templatebuilder\avia-shortcodes\contact.php file directly, my alternate URL shows just fine. I would rather not edit the core theme files. Any idea what might be wrong here?
/* Hook into Contact form and change action URL*/
add_filter('avia_contact_form_args', 'avia_contact_form_args_mod', 10, 2);
function avia_contact_form_args_mod($form_args, $post_id){
$form_args['action'] = 'my custom URI here';
return $form_args;
}
You can disregard this. Turned out to be a conflict with a plugin causing the problem.