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.

Form duplication by code

  1. Is there a way to duplicate a form by code?
    Case: I'm using a custom post type, called event. When a new event is created I need to duplicate a standard form and add the id to a custom field of the event. In the front, the event is displayed with the form at the bottom of the page.
    I know I could use 1 form and set a hidden input field with the title or id of the specific event, but I want to seperate the entries of each event...

    Possible?
    (I'm a WP developer, a dirty php hooking way is not a problem ;) )

    Posted 13 years ago on Wednesday July 20, 2011 | Permalink
  2. Yes, this would be possible but it would definitely require custom code.

    You would have to inspect the core Gravity Forms code to see what is executed when you use the Duplicate feature on the page that lists your forms. Then you'd have to duplicate that functionality and repurpose it for your custom code. You'd then have to edit the post meta information to update the id of the custom field.

    Ideally as you mentioned you could use just one form with a hidden input. If you have a lot of events it could mean a lot of forms to then manage.

    Posted 13 years ago on Wednesday July 20, 2011 | Permalink
  3. I will give it a try!

    Posted 13 years ago on Friday July 22, 2011 | Permalink