{"id":26612,"date":"2020-12-22T14:33:13","date_gmt":"2020-12-22T14:33:13","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/?post_type=article&#038;p=653"},"modified":"2024-01-24T19:01:46","modified_gmt":"2024-01-24T19:01:46","slug":"fail-to-configure-redirect-action-hook","status":"publish","type":"troubleshooting","link":"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/","title":{"rendered":"Fail to Configure the Redirect Action Hook"},"content":{"rendered":"\n<p>The <strong>Redirect to Page<\/strong> post-submit action redirects to the internal pages on your website according to security reasons. But with the <strong>Call a Hook<\/strong> action, you can redirect users to external sites.<\/p>\n\n\n\n<p>Hooks can be called \u201cactions\u201d in other words. You create an action using HTML code and insert it into your theme\u2019s functions.php file. Upon the Form submission, if the hook inserted into a corresponding field matches the code in functions.php, the action is performed.<\/p>\n\n\n\n<p>Let\u2019s consider the following example:<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/03\/call-a-hook-redirect.png\" alt=\"call a hook notification type settings\">\n\n\n\n<p><br>Here is the hook where \u201credirect\u201d is the Hook name, and you can insert your own one based on the tips below this field.<\/p>\n\n\n\n<p>After that, this code should be inserted into <strong>functions.php<\/strong> of your active theme:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'jet-engine-booking\/redirect', function() {\n   wp_redirect( 'https:\/\/wordpress.org\/' );\n    exit;\n}\n);<\/code><\/pre>\n\n\n\n<p>Go to <strong><em>Appearance > Theme Editor<\/em><\/strong> and press the <strong>Theme Functions (functions.php)<\/strong> tab in the right-side section. Scroll down the theme contents a bit and paste the code in there. Then update the file.<\/p>\n\n\n\n<img decoding=\"async\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/03\/code-input.png\" alt=\"functions.php editing and code input\">\n\n\n\n<p><br>This hook means that upon form completion you will be redirected to <a href=\"https:\/\/wordpress.org\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/wordpress.org\/<\/a>.<\/p>\n\n\n\n<p>Another example would be redirected to URL from the form field only if the user has chosen the option to redirect.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'jet-engine-booking\/redirect', function( $data ) {\nif ( $data&#91; 'redirect' ] == 'true' ) {\n   wp_redirect( $data&#91; 'page_url' ] );\n    exit;\n}\n}\n);<\/code><\/pre>\n\n\n\n<p>Here is the hook where &#8216;redirect&#8217; can be radio or checkbox field and  &#8216;page_url&#8217; can be text or the hidden field with the page URL.<\/p>\n\n\n\n<p>The <strong>Call a Hook<\/strong> functionality requires developer skills and knowledge in order to create the necessary actions. You can learn more from here: <a href=\"https:\/\/developer.wordpress.org\/plugins\/hooks\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/developer.wordpress.org\/plugins\/hooks\/<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find out how to set the redirect action hook properly to redirect users to the needed pages successfully.<\/p>\n","protected":false},"author":11,"featured_media":0,"template":"","troubleshoot-tags":[378],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using the Redirect Action Hook Functionality | Crocoblock<\/title>\n<meta name=\"description\" content=\"From this post, you&#039;ll learn how to use the Call a Hook notification type and create a Redirect Action Hook for the JetEngine Form.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using the Redirect Action Hook Functionality | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"From this post, you&#039;ll learn how to use the Call a Hook notification type and create a Redirect Action Hook for the JetEngine Form.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-24T19:01:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/03\/call-a-hook-redirect.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/\",\"name\":\"Using the Redirect Action Hook Functionality | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2020-12-22T14:33:13+00:00\",\"dateModified\":\"2024-01-24T19:01:46+00:00\",\"description\":\"From this post, you'll learn how to use the Call a Hook notification type and create a Redirect Action Hook for the JetEngine Form.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Troubleshooting\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Fail to Configure the Redirect Action Hook\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"name\":\"Help Center\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\",\"name\":\"Help Center\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"contentUrl\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"caption\":\"Help Center\"},\"image\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using the Redirect Action Hook Functionality | Crocoblock","description":"From this post, you'll learn how to use the Call a Hook notification type and create a Redirect Action Hook for the JetEngine Form.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/","og_locale":"en_US","og_type":"article","og_title":"Using the Redirect Action Hook Functionality | Crocoblock","og_description":"From this post, you'll learn how to use the Call a Hook notification type and create a Redirect Action Hook for the JetEngine Form.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/","og_site_name":"Help Center","article_modified_time":"2024-01-24T19:01:46+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2023\/03\/call-a-hook-redirect.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/","url":"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/","name":"Using the Redirect Action Hook Functionality | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2020-12-22T14:33:13+00:00","dateModified":"2024-01-24T19:01:46+00:00","description":"From this post, you'll learn how to use the Call a Hook notification type and create a Redirect Action Hook for the JetEngine Form.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/fail-to-configure-redirect-action-hook\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crocoblock.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Troubleshooting","item":"https:\/\/crocoblock.com\/knowledge-base\/troubleshooting\/"},{"@type":"ListItem","position":3,"name":"Fail to Configure the Redirect Action Hook"}]},{"@type":"WebSite","@id":"https:\/\/crocoblock.com\/knowledge-base\/#website","url":"https:\/\/crocoblock.com\/knowledge-base\/","name":"Help Center","description":"","publisher":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization","name":"Help Center","url":"https:\/\/crocoblock.com\/knowledge-base\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/","url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","contentUrl":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","caption":"Help Center"},"image":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/troubleshooting\/26612"}],"collection":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/troubleshooting"}],"about":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/types\/troubleshooting"}],"author":[{"embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/users\/11"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=26612"}],"wp:term":[{"taxonomy":"troubleshoot-tags","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/troubleshoot-tags?post=26612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}