Title: Does redirect work with shortcode?
Last modified: August 24, 2016

---

# Does redirect work with shortcode?

 *  [Daniel Proczko](https://wordpress.org/support/users/diggler/)
 * (@diggler)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/)
 * Redirect not working in Ajax or redirect mode on a shortcode embedded form. Should
   it?
 * [https://wordpress.org/plugins/wpgform/](https://wordpress.org/plugins/wpgform/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [Daniel Proczko](https://wordpress.org/support/users/diggler/)
 * (@diggler)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019160)
 * [Page with form](http://buildittogether.newmindgroup.com/register-now/)
 *  Plugin Author [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * (@mpwalsh8)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019181)
 * Yes it should but in your case it doesn’t because you have Javascript errors 
   on your page which prevent the redirect from ever firing.
 * Your error is somewhere in here:
 *     ```
       ga('send', 'pageview');
       	$(document).ready(function() {
   
       	$("form#ss-form").each(function() {
       		var jqForm = $(this);
       		var jsForm = this;
       ```
   
 * To safely use Javascript’s “$” shortcut within WordPress, you need to do something
   like this so jQuery will run in “no conflict” mode:
 *     ```
       //  Google Forms v0.76 jQuery script
       jQuery(document).ready(function($) {
       ```
   
 * There is some [more information in the WordPress Codex](https://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers).
 *  Thread Starter [Daniel Proczko](https://wordpress.org/support/users/diggler/)
 * (@diggler)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019193)
 * I didn’t need that code anyway. Removed. Redirects are still not working.
 *  Thread Starter [Daniel Proczko](https://wordpress.org/support/users/diggler/)
 * (@diggler)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019200)
 * I see the following in the source code after page submission, but the page never
   redirects.
 *     ```
       "//  Confirmation page by redirect
        window.location.replace("http://buildittogether.newmindgroup.com/registration-confirmation/") "
       ```
   
 *  Plugin Author [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * (@mpwalsh8)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019205)
 * Can you try something for me? Temporarily turn off validation on the form and
   see if the redirect works then. I suspect it will. I am reading something and
   it appears that the jQuery Validation library has a minor change in it that I
   haven’t accounted for.
 *  Thread Starter [Daniel Proczko](https://wordpress.org/support/users/diggler/)
 * (@diggler)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019243)
 * Mike,
 * Yup, that worked. Turning off validation allowed the redirect to take place.
 * So what are next steps?
 *  Plugin Author [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * (@mpwalsh8)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019276)
 * Not sure. I did some comparisons with a form on my site and the exact same syntax
   works on my site which fails on your site. I need to do some more testing.
 * Can you fill out my [Help and Support Form](http://bit.ly/wpgform)? I’d be curious
   to see if there is something different about your form and the one I test with.
   It looks like you did some regular expression validation – what is your RegExp?
 *  Thread Starter [Daniel Proczko](https://wordpress.org/support/users/diggler/)
 * (@diggler)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019352)
 * The only REGEXP would be what Google bakes in for url validation. The 2 fields(
   linkedin and Google+) are the only 2 with url validation and neither are required.
 *  Plugin Author [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * (@mpwalsh8)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019415)
 * There is still something odd going on. When I look at your page now it still 
   generates a Javascript error:
 *     ```
       TypeError: $(...).columnize is not a function
       	$(".wpgform-wrapper").columnize({
       ```
   
 * This shouldn’t be happening. In looking at the page source, the Javascript library
   which Google Forms loads as part of the [wp_footer](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_footer)
   action isn’t loaded. It looks like either (a) your theme isn’t calling [wp_footer()](https://codex.wordpress.org/Function_Reference/wp_footer)
   or (b) some other plugin is mucking with the [wp_footer](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_footer)
   action so the Google Forms hook never gets called.
    The net result in the Javascript
   library never being loaded which is why I am seeing the jQuery error. If you 
   enable validation again it is the exact same problem just earlier in the jQuery
   script as the jQuery Validate library is loaded from the same hook as the Columnizer
   library is.
 * What other plugins do you have loaded?
 *  Plugin Author [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * (@mpwalsh8)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019528)
 * I don’t see the error on the page any longer, did you find the source of the 
   Javascript error?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Does redirect work with shortcode?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpgform_8cc59f.svg)
 * [Google Forms](https://wordpress.org/plugins/wpgform/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpgform/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpgform/)
 * [Active Topics](https://wordpress.org/support/plugin/wpgform/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpgform/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpgform/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/does-redirect-work-with-shortcode/#post-6019528)
 * Status: not resolved