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.

GF_IMPORT_FILE for multiple forms?

  1. webdevstudios
    Member

    I'm trying to import multiple forms in a Multisite network when a new site is created. Using GF_IMPORT_FILE I can get one form to import successfully, but not two. Is this possible? I've searched around and can't find any topics on the subject.

    I'm running GF 1.5.2.8

    Posted 12 years ago on Thursday September 8, 2011 | Permalink
  2. webdevstudios
    Member

    After diving in further I realized there is no way this could work unless the constant could accept an array of form templates. I ended up hacking GF to allow the GF_IMPORT_FILE to accept an array of XML files and updated import_file to loop through that array and import each one.

    Not pretty but it works for what I need. Maybe a future version of GF could support this?

    Posted 12 years ago on Thursday September 8, 2011 | Permalink
  3. The trick is the XML export file can contain multiple forms. If you export multiple forms they export to a single XML file. You can then import that single XML file which will then create multiple forms based on the data in the XML file.

    Posted 12 years ago on Thursday September 8, 2011 | Permalink

This topic has been resolved and has been closed to new replies.