Documentation:UBC Content Management System/Site Migration/Gravity Forms
Issue
When importing a form into a new site, the ID does not match up, hence the form shortcode's on all pages corresponding to the form will not render -as the ID is incorrect
Assumptions
- your 'from' site only has a few forms
- your 'to' site has NO forms (i.e. is a new site / blank site)
- your form ID on your 'from' site is set to ID # 4 (as an example)
Important note
- Form ID's always increase in value even after a Form has been deleted
- this is particulalry important for sites that have multiple forms
- it does not free up that ID value
- you cannot use a Form ID for a value that was once created (even though it is now deleted)
- so you only get one chance at this
- e.g. create a form (assign's ID #1), delete the form, create another one (assign's ID #2)
- if you get this part wrong, you may have to delete the new site & start over, or find & replace all Form ID's on the site (all pages that refer to form)
Export
- Export your form
- Dashboard > Forms > Import/Export > Export Forms (top area)
- Select form to export
- Download the file
Import
- Import a dummy form XML into the site
- Dashboard > Forms > Import/Export > Import Forms (top area)
- Select file to import
- Hit 'Import'
- Repeat this 3 times for example (it's very quick to import a form) -to set a form ID of # 4
- WordPress allocates a Form ID in a sequential increasing order
- Then when you import the correct form the 4th time, it will allocate an ID of 4 to your form
- Effectively, the dummy forms are just placeholders
- Delete all the other dummy forms you created
- The remaining form will retain it's ID (of # 4 in this example)
Notes
To enable the 'reCaptcha' feature on the 'to' (or new) site, perform the following:
- go to Dashboard > Forms > Settings (on the 'from' site)
- under the reCapture Settings, copy the key codes
- go to Dashboard > Forms > Settings (on the 'to' site)
- under the reCapture Settings, paste the key codes