I am displaying a payment form using the do_shortcode in a theme file.
However, it doesn't load the Forms.css file.
What is the best way to enqueue the CSS file properly & the clean way ?
I am displaying a payment form using the do_shortcode in a theme file.
However, it doesn't load the Forms.css file.
What is the best way to enqueue the CSS file properly & the clean way ?
http://www.gravityhelp.com/documentation/page/Embedding_A_Form#Enqueue_Scripts_and_Styles
You can use the function gravity_form_enqueue_scripts to enqueue the scripts and styles.
Also, you don't have to use do_shortcode in your theme. You can use the Gravity Forms function directly. Details here: http://www.gravityhelp.com/documentation/page/Embedding_A_Form#Function_Call
Thank you for the enqueue script tip. Though, it is not very convenient since I call the form in a content template. Any solution to embed the form in an iframe maybe ?
Also, I can't use the Gravity Forms function for the moment since passing field values is not implemented yet. Any idea when it will be done ?
Not sure how the iframe would help you here. Please explain.
With the page template, you could add a conditional in your header.php to enqueue the scripts when that page template is used. Use the is_page_template function to enqueue the scripts only when you need to, when that template is being used.
OK on using the do_shortcode function. It won't hurt anything like this and might be the easiest way for you.