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.

Import on plugin activation and GF-related plugin advice

  1. Just prior to WP 3.0 I created a rideshare board that uses GF as the submission engine. Rideshare was a category of posts and a series of custom fields stored the data. Even finding a solution to doing query_post loops based on multiple custom field values before it was part of core (http://idealienstudios.com/blog/wordpress/custom-field-query-quandry/).

    I'm looking at updating that code to become a plugin that others running WP + GF could leverage. Changing it to a custom post type and having dropdown field entries get populated from tags should be easy. Have some other ideas / questions that I'm hoping you could share thoughts on.

    1. Custom validation as a plugin indicates that I will have a problem with any custom validation involved out of the functions.php file. I don't have any right now, but curious what recommendation would be if this comes up.
    2. Import by code on plugin activation? The easy option on importing the rideshare form is to have the user import my exported form xml and then add it via the post / page editor to whatever page they want the submission form on. Do you have any snippets / examples of automating the import / creation of a form from another plugin?
    3. The list of rideshares will be able to add to a page by short-code or a php function call into desired template. I have some ideas for doing more advanced filtering of rides like this jQuery quicksand portfolio that might be incorporated once the heavy lifting is done.

    Any other thoughts / tips about doing dev related to GF as a plugin maintaining separation from the theme files as much as possible would be greatly appreciated.

    Jamie

    Posted 12 years ago on Tuesday October 18, 2011 | Permalink
  2. Items #1 and #3 have been solved to my satisfaction. The automagic import of the form I have created upon plugin activation (if GF has been installed) still escapes me. I did find import_form_page() in export.php as the likely function to be working with, but the process to fake a form submission on plugin activation escapes me. Any suggestions?

    Posted 12 years ago on Tuesday October 25, 2011 | Permalink