Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: GF-webinar-order
- Description: get product data and add to gravity form based on disease selection of user
- Developer: Eyal Ron
- version: 1.0
- */
- //gravity forms variables
- $formIDArray = array('144');
- //Gform data
- foreach ($formIDArray as $id) {
- add_action( 'gform_enqueue_scripts_'.$id, 'getProductData', 10, 2 );
- }
- function add_stylesheet()
- {
- wp_enqueue_style( 'webinar-GF-create-order.css', plugins_url( '/css/webinar-GF-create-order.css', __FILE__ ) );
- }
- add_action( 'wp_enqueue_scripts', 'add_stylesheet' );
- /* functions definition */
- //run function on form looaded
- function getProductData(){
- wp_enqueue_script( 'webinar-GF-main.js', plugins_url( '/inc/main.js', __FILE__ ) );
- }
Add Comment
Please, Sign In to add comment