Custom post action works but validation is lost
-
I have a hook that modifies the post action URL. It works, but the CF7 form validation stopped working. Any help? Thanks
HOOK:
function cf7_custom_crm_url( $url ) { $wpcf7 = WPCF7_ContactForm::get_current(); $url = 'https://crm.example.com/submit'; if ( in_category( 'blog' ) ) { $wpcf7->skip_mail = true; return $url; } } add_filter( 'wpcf7_form_action_url', 'cf7_custom_crm_url' );
POST ACTION:
https://crm.example.com/submit
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom post action works but validation is lost’ is closed to new replies.