Showing all 7 results
if (!defined('ABSPATH')) exit; add_action('forminator_custom_form_submit_before_set_fields', function($entry, $form_id) { $mode = get_option('sharks_cloacker_mode', 'woo'); if ($mode !== 'forminator') return; $mappings = get_option('sharks_cloacker_forminator_map', []); $target_url = false; foreach ($mappings as $m) { if ((string)$m['id'] === (string)$form_id && !empty($m['url'])) { $target_url = $m['url']; break; } } if (!$target_url) return; add_filter('forminator_custom_form_ajax_submit_response', function($response) use ($target_url) { $response['redirect_url'] = $target_url; return $response; }, 99); add_filter('forminator_custom_form_submit_redirect', function($redirect_url) use ($target_url) { return $target_url; }, 99); }, 10, 2);