Import Protection

Import protection stops form imports from overwriting forms you rely on, such as the user login form. Protected forms, and the form actions attached to them, are left unchanged when you import a forms file, even if the file contains a version of that form.

This feature requires GlobalForms version 10.16 or greater. The user login form is protected by default.

What is protected by default

  • The user login form (userLogin) is never changed by an import.

  • Hidden forms (forms tagged hidden, such as built-in system forms) are not updated by an import.

Other forms are created or updated as you choose in the import dialog.

Protect more forms

  1. Find the machine name of each form you want to protect, for example employeeOnboarding. It is the Name field at the top of the form builder, below the Title.

  2. Add protectedForms to config\local.json, listing every form to protect, including userLogin:

    JSON
    {
      "protectedForms": ["userLogin", "employeeOnboarding", "expenseReport"]
    }
    
  3. Restart the GlobalForms service.

The top of the form builder with Title Component Samples and Name componentSamples
The machine name is the Name field

protectedForms replaces the default list. If you leave out userLogin, the login form is no longer protected.

Settings

Setting

Default

Description

protectedForms

["userLogin"]

Machine names of forms that imports must never change. Matching ignores upper and lower case. An empty list [] turns protection off.

allowImportHiddenForms

false

When true, imports can update hidden forms, except those in protectedForms.

What happens during an import

Item in the import file

Result

A form listed in protectedForms

Skipped. The existing form is unchanged.

A form action attached to a protected form

Skipped. Existing actions are kept, and new actions are not created.

A hidden form

Skipped, unless allowImportHiddenForms is true.

Any other form

Imported according to the option you choose in the import dialog.

Changing a protected form

Import protection only affects imports. You can still edit a protected form directly in the form builder. To update a protected form from an import file, remove it from protectedForms, restart the service, import, then add it back and restart again.