$(…).validate is not a function when using do_shortcode
-
When using the do_shortcode() to display my form, I get the following error:
Uncaught TypeError: $(…).validate is not a function
It is occurring here:
https://sightlines.quantumdynamix.net/upcoming-webinars/webinar/exploring-the-state-of-sustainability-in-higher-education-2015/Here’s my shortcode:
$webShortcode = '[register_free_webinar webid='.get_field('qd_webinar_id').' pageid='.get_the_ID().']'; echo do_shortcode($webShortcode);
The get_field(‘qd_webinar_id’) uses the long numeric value of the webinar’s ID from it’s URL.
Then the pageid is set to the current custom post type post’s id, because I’m going to be doing some other stuff once the form is submitted on this page.
My returned shortcode that I run is:
[register_free_webinar webid=3078989171299094273 pageid=1347]
If I just copy and paste the above shortcode into the content editor, the form displays without any errors about .validate().
If I run this php:
$webShortcode = '[register_free_webinar webid=3078989171299094273 pageid=1347]'; echo do_shortcode($webShortcode);
I also get the validate() error, so it is not a problem with my php pulling the dynamic content.
Is there something with the plugin that doesn’t allow using do_shortcode() with this?
Any thoughts on why this is happening, or how to resolve it?
- The topic ‘$(…).validate is not a function when using do_shortcode’ is closed to new replies.