Presets - guiriosoficial/AutoForm GitHub Wiki
Presets are reusable configurations that define how AutoForm should fill a form. A preset contains a collection of fields, where each field specifies a selector, a generation method, and optional configuration.
Selecting a preset
Presets can be selected directly from the preset selector in the AutoForm interface. Selecting a preset loads its configured fields and makes it available to fill the current page.
Tip: Expand the preset selector and use the dropdown in the top-right corner to select a sorting option for your presets, either alphabetically or by creation date.
Adding a preset
To create new presets, just clit at + New in presets card.
It will create a new empty preset
Editing preset name
To edit a preset name, you need to load the preset, and click at preset name in preset editor Preset names must be unique.
Removing a preset
A preset can be removed from the preset management interface. Removing a preset permanently removes its configuration.
Removing a preset does not remove custom methods. Custom methods are global and are independent from presets.
Importing and Exporting presets
Presets can be exported to a file and imported later.
This makes it possible to:
- Back up your presets.
- Share presets between environments.
- Move configurations between installations.
- Keep reusable form configurations outside the extension.
You can import or export your presets by clicking at ... in presets manager and selecting import or export option
Custom methods are included
When a preset is exported, any custom methods used by its fields are exported together with the preset. When that preset is imported, the associated custom methods can also be restored. For more information about custom methods, see Custom Methods.
Import Conflicts
When importing presets, AutoForm can identify two types of conflicts: name conflicts and existing item conflicts.
Name conflicts
A name conflict occurs when an imported preset or custom method has the same name as an existing item.
Name conflicts are not affected by the selected import strategy. Instead, imported items with duplicate names are automatically renamed using the configured import suffix.
For example, if a preset named My Preset already exists, an imported preset with the same name will be renamed to My Preset (Imported).
If that name also exists, a sequential suffix is used, such as My Preset (Imported 2).
Existing item conflicts
An existing item conflict occurs when an imported preset has the same ID as an existing preset, or a custom method has the same key as an existing custom method, but their contents differ.
These conflicts are handled according to the selected import strategy.
Import strategies
AutoForm provides different strategies for handling existing data when importing presets. For example, an imported preset may contain presets or custom methods that already exist in the current installation. The import strategy determines how these conflicts should be handled.
Available strategies can be configured in [Settings](https://github.com/guiriosoficial/AutoForm/wiki/Presets/Settings#preset-import-strategies).
Tip: If you frequently import presets from different sources, configure your preferred import strategy beforehand so the import process behaves consistently.