Migrations can be a pain, but there are plenty of tools out there that make the task much easier. One thing we’ve always found aggravating is moving our forms across different websites. We use Gravity Forms to create forms for our own websites, clients, etc. Since Gravity Forms is a visual builder for forms, your form configurations are stored in a database. Instead of hard coding forms, the data is used to dynamically render forms.
While this makes for easily creating dynamic forms, it also adds complexity when you need to move the forms to another site. For example, we almost always start out by building forms in a local environment, which is basically just a website that runs on your own computer rather than a remote web server. This makes the development process quicker.
After developing locally, we move things to a staging site for further review and testing. This usually involves moving files from local to staging, such as changes to custom themes and plugins. Since we use continuous deployment for this, our code changes are deployed automatically when we push them to a git repository. Yay, automation!
Send File Uploads Straight to Amazon S3
SyncS3 for Gravity Forms lets you send your file uploads to any Amazon S3 bucket. Store your images, videos, and other files on Amazon’s high quality infrastructure.
So what happens if we update a form? We often work on building complex forms with conditional logic and feed data (e.g. PayPal, Mailchimp, etc.). Since this is all stored in the database, deploying form changes isn’t as easy as pushing code changes. Well, not by default anyway. By default, your only options for deploying form changes are: 1.) Migrating your database, or 2.) Exporting and importing your forms. Migrating a database is not ideal; it takes a while, and can overwrite other data you don’t want to modify, such as settings. Exporting and importing requires a lot of clicks, and is rather clunky to do each time you updates forms.
A New Solution for Syncing Gravity Forms
We recently learned of a tool that gives you a third option. This new option makes deploying form changes as simple as deploying code changes. If you use a continuous deployment pipeline, you can automatically push and sync changes to your forms without any extra clicks.
FormSync is a premium plugin that turns your Gravity Forms configurations into JSON files, and stores them wherever you want them (in your theme by default). Then, when those JSON files are pushed to another website such as staging or production, you can sync the changes manually or automatically. How awesome is that?!
Recently, we needed to sync six different forms between local, staging, and production. Without FormSync, this would have been a rather tedious task to upload each import file on the different sites. FormSync allowed us to push the forms as JSON and trigger automatic syncs. We literally just pushed the changes to the custom theme to its Github repository, and our continuous deployment pipeline triggered the sync. Updating these forms required no additional effort to sync them up.
How does FormSync Work?
Getting started with FormSync is dead simple. You just run an initial scan on all your forms using the bulk scan option.
From that point on, each time you save changes of your forms, FormSync does its thing to update the JSON configuration files with the new changes. Commit and push the changes, and trigger your deployments!
For developers and power users who like to manage things in git, FormSync has emerged as one of our favorite workflow tools for WordPress. What used to be an annoying task is now no task at all, thanks to FormSync and our continuous deployment. After using it for the first time, it feels like one of those things that you don’t know how you worked without. We recommend giving it a spin.