The way WordPress works with enqueuing scripts dynamically it can't be done at anytime, it can only be done at certain times when a page is processed by WordPress. One of those ways is via the loop when a shortcode is parsed.
See the documentation on embedding a form here:
Under the function call documentation there is a note regarding the scripts and CSS and how to manually enqueue them.
Posted 4 years ago on Tuesday December 14, 2010 | Permalink