Documentation:UBC Content Management System/Site Migration/Gravity Forms

From UBC Wiki

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

  1. your 'from' site only has a few forms
  2. your 'to' site has NO forms (i.e. is a new site / blank site)
  3. 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

  1. Export your form
  2. Dashboard > Forms > Import/Export > Export Forms (top area)
  3. Select form to export
  4. Download the file


Import

  1. Import a dummy form XML into the site
  2. Dashboard > Forms > Import/Export > Import Forms (top area)
  3. Select file to import
  4. 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:

  1. go to Dashboard > Forms > Settings (on the 'from' site)
  2. under the reCapture Settings, copy the key codes
  3. go to Dashboard > Forms > Settings (on the 'to' site)
  4. under the reCapture Settings, paste the key codes