I was wondering if there’s a way to create forms programmatically without actually saving them to the database.
I have a large site, with many forms, some of them quite complex. Most of them are sending stuff to third party applications.
I’d like to be able to create my forms in PHP (or json or whatever), with proper version control, with “hard coded” IDs so that I don’t have to worry to keep track of local vs production form IDs.
Is there a way to achieve this? Such as function/method to which I can pass a form object and it will render the form? (this way I can even use gettext calls to internatinalize labels instead of having to rely on WPML glue plugin or having form duplicates for different languages).
GFAPI::add_form , but it’s only creating the form in the backend