Currently, Implementer Interface for Forms 2.0 allows the user to export the form one by one. Also, import of form is allowed only one at a time. This is not optimal, especially if the user is working with 10-20 forms and multiple versions and needs to manually click on the export for each. This issue was discussed in PAT Call on 12th June (PAT Call 12 June 2019 - Google Docs).
For this, we propose an import & export action for multiple forms at a time:
A user can choose which forms to export through the checkboxes next to form names
The forms will be downloaded/exported as a zip
A user can import multiple forms at a time through a zip file
A user can import a single or multiple forms as json file from the window picker. The latter will be developed based on technical complexity
Forms should be imported in draft version, and will be manually saved and published by the IE
Please share if this flow works for your use cases
After discussion with the product team, we decided upon the below idea for import/export multiple 2.0 forms in the form builder
Export
A new API, that will take multiple forms UUIDs list and the response will be a zip file with the list of form.json files ( form resource and translation)
On UI restricting the user to select only ānā no of forms, in order to reduce the load on the server.
For all the errors for the forms on the server side, all are written to one error file and added to the response object
Import
Currently, for a single form, we are uploading the JSON of the form to be imported. Now for multiple
forms, we will upload a zip file that contains all the form JSONs to be imported
Unzip and perform all existing UI validations for each form and make separate existing API call for
each form to save form resource and translations
Just like in export, restrict the user to import only ānā no of forms in a zip file
As API change is not there, so error handling will be the same as in the single form import