Ask questions and chat with this page directly in ChatGPT
TABLE OF CONTENTS
Intro
Gravity Forms is a powerful and easy-to-use WordPress forms plugin. I have worked on countless tutorials, which can be found here.
In short, the plugin provides one with a wonderful GUI-based form builder and a set of extra features, to mention a few: Conditional Logic, Custom Notifications, 3rd party integration, etc. I use this plugin with pretty much every project I work on.
In this short tutorial, I’ll show you how to overcome the problem of having the same form displayed multiple times in a single WordPress page. The details of that are explained thoroughly at: https://docs.gravityforms.com/embedding-one-form-multiple-times-per-page/.
Take on the problem
My take on that problem is quite simple:
- Duplicate the form you want to use.
- Place it anywhere on the page.
- Upon its submission, create an entry associated with the Main Form.
The above may come in handy and may be needed in plenty of situations:
- You export entries elsewhere regularly, and you want to avoid having to deal with multiple forms.
- You prefer to manage all your entries associated with one page from one place.
The code
I think that the code should be self-explanatory, although there are a couple of important things to bear in mind:
- We’re using the after_submission_hook, which has its pros and cons (say, some SPAM entries may incorrectly land in your inbox).
- Due to the GF core array_merge_recursive hidden behind the API, we have to unset some of the $_POST global values to avoid incorrect values being passed to the API Read more here: https://gist.github.com/rxnlabs/1bd931bb0261e53e882e9e7315bae8dc.
- Have questions?
- Are you dealing with similar problems, and you haven’t got the skills to take care of them yourself?
Ping me via the Contact Form 🙂






