{% extends 'formie/_layouts/settings' %} {% import '_includes/forms' as forms %} {% import 'verbb-base/_macros' as macros %} {% block content %}

{{ 'Import' | t('formie') }}

{{ 'Select a JSON file you‘ve exported from Formie to import. You‘ll be able to configure your import at the next step.' | t('formie') }}

{% if importError %}

Error: {{ importError }}

{% endif %}
{{ redirectInput('formie/settings/import-export/import-configure/{filename}') }} {{ csrfInput() }} {{ forms.fileField({ label: 'Import File' | t('formie'), instructions: 'Upload the JSON file that‘s been exported from Formie.' | t('formie'), name: 'file', }) }}

{{ 'Export' | t('formie') }}

{{ 'Select a form to export as a JSON file. This will include all pages, settings, notifications and fields. You‘ll be able to import this file later on the same, or a different environment.' | t('formie') }}

{% if exportError %}

Error: {{ exportError }}

{% endif %}
{{ csrfInput() }} {% set formOptions = [{ label: 'Select an option' | t('formie'), value: '' }] %} {% for form in craft.formie.forms.orderBy('title').all() %} {% set formOptions = formOptions | merge([{ label: form.title ~ ' (' ~ form.handle ~ ')', value: form.id }]) %} {% endfor %} {{ forms.selectField({ label: 'Form' | t('formie'), instructions: 'Select a form to export.' | t('formie'), id: 'formId', name: 'formId', required: true, options: formOptions, }) }}
{% endblock %}