PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Importing multiple forms on plugin activation

  1. I'm currently importing a single form upon my plugin's activation. Here is the code:

    define("GF_IMPORT_FILE", plugins_url( 'templates/get-a-free-estimate.xml' , __FILE__ ));
    function nwtd_lpfs_import_form() {
    	if(defined("GF_IMPORT_FILE") && !get_option("gf_imported_file")){
            GFExport::import_file(GF_IMPORT_FILE);
            update_option("gf_imported_file", true);
        }
    }
    add_action('init', 'nwtd_lpfs_import_form' );

    Is it possible to import multiple forms using the above code? I'm not exactly sure how i'd go about it.

    TIA

    Posted 11 years ago on Monday May 13, 2013 | Permalink