Can′t single out a specific form through ID
-
Hi,
I’m trying to add a specific action to a form but I can’t find a way to single it out because all the methods I’ve been searching for, simply fail.
Here’s the code I’m using:
function newsletter_subscription_action($url) { global $wpcf7_contact_form; if($wpcf7_contact_form->ID === 'myformid') { return('myaction'); } else { return $url; } } add_filter('wpcf7_form_action_url', 'newsletter_subscription_action');
It seems that
$wpcf7_contact_form
doesn’t exist. Can someone give me a hand. I have no idea what variable I should use to get the form ID.Thank you,
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Can′t single out a specific form through ID’ is closed to new replies.