Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Enqueue and localize javascript in functions.php */
- function directory_addfront_js(){
- wp_enqueue_script('jquery_directoryFront', get_stylesheet_directory_uri().'/directory_front.js', array('jquery', 'jquery_quickselect', 'jquery_quicksilver'));
- wp_localize_script( 'jquery_directoryFront', 'marconfAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
- }
- add_action( 'wp_enqueue_scripts', 'directory_addfront_js');
- /* In functions.php create the "ajax" function to load the form that will called by javascript via ajax. */
- add_action('wp_ajax_loadPersonUpdateForm', 'loadPersonUpdateForm');
- /* Function to load the Person Update Form - ID 7 */
- function loadPersonUpdateForm() {
- echo apply_filters('the_content', do_shortcode('[gravityform id="7" name="Please update this Person\'s information!" ajax="true"]'));
- // $result = self::get_form("7", true, true, true, null, true, 1); //second method - produced same results
- die($result);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement