Answers.Body: <p>Sprout Forms will be adding support for <a href="https://github.com/craftcms/cms/blob/3.1/docs/project-config.md" rel="nofollow noreferrer">Project Config</a> in Craft 3.1. At the time of this posting the Craft Project Config has not yet been released, the Project Config will likely give us a much better workflow to maintain plugin settings between environments.</p>
  
  <p>While there is an alternative, the export/import path described below would be a bit tedious to maintain and could just be easier to do manually depending on how many Forms you need to migrate (as you will have to define those forms in the export JSON to get them exported). </p>
  
  <hr>
  
  <p>Sprout Forms has a Sprout Import integration and supports importing <code>Form</code> and Form <code>Entry</code> Elements via the Sprout Import <a href="https://sprout.barrelstrengthdesign.com/docs/import/element-importers.html" rel="nofollow noreferrer">Element Importer API</a>.</p>
  
  <p>With the Sprout Forms/Sprout Import integration you could:</p>
  
  <ol>
  <li>Create a Twig template or script that outputs your Forms (and/or Entries) to a JSON file</li>
  <li>Create a <a href="https://docs.craftcms.com/v3/extend/migrations.html" rel="nofollow noreferrer">Migration</a> that grabs that JSON export and hands it off to Sprout Import to import.</li>
  </ol>
  
  <p>This import can be triggered using the Sprout Import service layer or via a <a href="https://sprout.barrelstrengthdesign.com/docs/import/console-commands.html" rel="nofollow noreferrer">console command</a>.</p>
  
  <p><code>./craft sprout/import/run --file="@root/import.json"
  </code></p>
  
  <p>More on importing forms using this API: <a href="https://sprout.barrelstrengthdesign.com/docs/forms/importing-data.html#forms" rel="nofollow noreferrer">https://sprout.barrelstrengthdesign.com/docs/forms/importing-data.html#forms</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-13T13:49:53.343Z
Answers.LastActivityDate: 2018-12-13T22:47:04.843Z
Answers.LastEditDate: 2018-12-13T22:47:04.843Z
Answers.UserDisplayName: Ben Parizek
Body: <p>Is there any way to migrate the configuration of a Sprout Form between my local environment and the production environment?</p>
  
  <p>I'm on Craft 3.</p>
  
  <p>Ideally, I'd love to generate a migration using the migration manager <a href="https://github.com/Firstborn/Craft-CMS-Migration-Manager" rel="nofollow noreferrer">https://github.com/Firstborn/Craft-CMS-Migration-Manager</a> but would love any way to move the settings of a form.</p>
  
Tags: <plugin-sproutforms><migration>
Title: Migrate sprout forms
ThreadText: # Migrate sprout forms
  
  (Asked by: username_0 on 2018-12-12)
  
  Is there any way to migrate the configuration of a Sprout Form between my local environment and the production environment?
  
  I'm on Craft 3.
  
  Ideally, I'd love to generate a migration using the migration manager <https://github.com/Firstborn/Craft-CMS-Migration-Manager> but would love any way to move the settings of a form.
  
  **Tags:** plugin-sproutforms, migration
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-12-13. Score: 2 | Accepted answer
  
  Sprout Forms will be adding support for [Project Config](https://github.com/craftcms/cms/blob/3.1/docs/project-config.md) in Craft 3.1. At the time of this posting the Craft Project Config has not yet been released, the Project Config will likely give us a much better workflow to maintain plugin settings between environments.
  
  While there is an alternative, the export/import path described below would be a bit tedious to maintain and could just be easier to do manually depending on how many Forms you need to migrate (as you will have to define those forms in the export JSON to get them exported).
  
  ---
  
  Sprout Forms has a Sprout Import integration and supports importing `Form` and Form `Entry` Elements via the Sprout Import [Element Importer API](https://sprout.barrelstrengthdesign.com/docs/import/element-importers.html).
  
  With the Sprout Forms/Sprout Import integration you could:
  
  1. Create a Twig template or script that outputs your Forms (and/or Entries) to a JSON file
  2. Create a [Migration](https://docs.craftcms.com/v3/extend/migrations.html) that grabs that JSON export and hands it off to Sprout Import to import.
  
  This import can be triggered using the Sprout Import service layer or via a [console command](https://sprout.barrelstrengthdesign.com/docs/import/console-commands.html).
  
  `./craft sprout/import/run --file="@root/import.json"`
  
  More on importing forms using this API: <https://sprout.barrelstrengthdesign.com/docs/forms/importing-data.html#forms>
  
  
  ---
  
  