Forms 2.0 - Migration from Action Form
This page is preliminary and subject to change as Forms 2.0 continues to be developed.
The classic Form module (avt.Action Form) can copy an existing form into a new Forms 2.0 Form module, so you don't have to rebuild it by hand. Before anything is created, a Migration Plan shows you what will carry over, what will change, and what will be left behind.
The original form isn't changed or removed. You test the new form next to it, and remove the old one when you're ready.
Before you start
- Forms 2.0 must be installed on the site. The Migration Plan button only appears when it is.
- You need edit rights on the classic form's module.
- Check the field types your form uses. Fields of a type that can't be migrated are left out completely, and they don't appear in the plan.
Migrate a form
- Open the classic form's Form Builder and go to the Fields tab.
- Click Migration Plan. A dialog lists the form's settings, events, and fields, each with its status. See Reading the plan.
- Read the plan, paying attention to the rows marked Migrated with warning, Transformed, and Skipped.
- Click Start Migration.
- A new Form module is added to the same page and pane as the original, with the same permissions. Its title is the original's with
Copyadded, for exampleContact Copy. - The new form's Form Builder opens with a banner: Migration preview: settings from your ActionForm module have been pre-filled. Review the form, then click Save. Nothing is saved to the new module until you do.
- Test the new form on the page, next to the original.
- When it works, remove or hide the original module, and rename the new one.
Reading the plan
The plan has three parts: Form Settings, Form Events (the On Page Load, On Preinit, and On Init action lists), and Fields, each with its own settings and button actions. Every row has a status:
| Status | Meaning | What to do |
|---|---|---|
| Migrated | Carried over as it is. | Nothing. |
| Migrated with warning | Carried over, but needs your attention, for example an action with a required value missing. The row's note says what. | Fix it in the new form. |
| Transformed | Carried over in a different form, for example a renamed setting, a Required checkbox that becomes a Required validator, or a classic action replaced by its Forms 2.0 equivalent. | Check that it still does what you expect. |
| Skipped | Not carried over. Forms 2.0 has no equivalent, or does it differently. | Rebuild it in Forms 2.0 if you still need it. |
The plan is saved with the classic form, so you can open it again after migrating and use it as a checklist.
What carries over
Form settings
| Classic setting | Forms 2.0 |
|---|---|
| Module title | Title with Copy added |
| Open form mode | How the form is shown (on the page or in a popup) |
| Root classes | Root CSS Classes |
| Popup name, Show loading, Debug | Same settings |
| Show form condition | Show Condition |
Settings about how the classic form looked or behaved in the browser are skipped, because Forms 2.0 lays out and validates forms differently. They include the form template, floating labels, label alignment and width, field spacing, padding and colors, popup size, the custom layout HTML, loading texts and colors, the client-side validation options, tooltips, Submit Hidden Fields, and the Tabs Pro options. Style the new form with Root CSS Classes and the layout settings instead. See Layouting.
Events
| Classic event | Forms 2.0 event |
|---|---|
| On Page Load | On Page Load |
| On PreInit | On Preinit |
| On Init | After Fields Initialization |
Most actions carry over as they are. Actions that work differently in Forms 2.0, such as opening and closing popups, initializing a form, or showing a toast, are replaced by their Forms 2.0 versions and marked Transformed. See Lifecycle for when each event runs.
Field types
| Classic field type | Forms 2.0 field |
|---|---|
| Text Box | Text Box |
| Text Area | Textarea |
| Rich Text (CKEditor or Trumbowyg) | Rich Text Box |
| Number | Number |
| Currency | Money |
| Date | Date |
| Time | Time |
| Phone | Phone |
| Password | Password |
| Select | Dropdown |
| Static HTML | Content Block |
| Button | Button |
Any other field type isn't migrated and isn't listed in the plan - for example hidden fields, checkboxes, radio buttons, and file uploads. Compare the plan's field list with your form, and add the missing fields to the new form yourself. For hidden fields, see Replacing hidden fields.
Field settings
- Name, label, and value. Each field keeps its Name, so tokens such as
[Email]keep working. - Validation. Required becomes a Required validator. Custom validators and the validation condition carry over. Validation groups are skipped - use the button's Validation Scope instead.
- Custom attributes carry over where the field type supports them.
- Skipped: help text, CSS styles, label CSS classes and styles, Disable Autocomplete, and column offsets.
Buttons
- The classic default button becomes a Primary button. Other buttons become Regular.
- Whether the button causes validation becomes its Validation Scope: Entire Form or None.
- Its click actions carry over, like the form's events.
- The Mini size becomes Small, the closest Forms 2.0 size.
Layout
The new form has a root container named Main Container, whose value is [FormData]. Each row of the classic form becomes a row in it. A classic row with several fields becomes a Layout Container in Manual mode, named Container, Container1, and so on, with the fields side by side as before.
Containers don't change in size by themselves on small screens. Check the new form at the Narrow width and give those containers a Vertical layout there if needed. See Responsive.
Replacing hidden fields
Classic forms often used hidden fields to carry a value, such as a record ID, from the moment the form opened to the moment it was submitted. Hidden fields aren't migrated, and Forms 2.0 has a better way to do this: Persist data for submit.
- In On Preinit or After Fields Initialization, create the value as a token, for example with Run SQL Query or Create/Update Tokens. Say it's named
OrderId. - On the same event's panel, check Persist data for submit and add
OrderIdto Data Keys. - In the button's actions, use
[OrderId]as before.
The value is stored in the form's encrypted state. Unlike a hidden field, it never reaches the browser as something the user can read or change. See Keeping data until submit.
If the user really does need to change the value, for example with your own JavaScript, use a normal field instead: set its Visible on Load to Not Visible and turn on Submit Value When Not Visible. See Visibility settings.
After migrating
- Test every button. Check each one's actions, especially rows marked Transformed or Migrated with warning.
- Update your JavaScript. The classic
dnnsf.api.actionFormmethods are replaced bypaa.form. See Javascript APIs. - Update references to the module. The new form has a new module ID. Actions and scripts that open, refresh, or target the old form by its module ID need the new one. A form opened by its Popup Name keeps working, because the name carries over.
- Check the layout at the Narrow, Medium, and Wide widths on the Canvas.
- Remove the original once the new form is in use, so users don't fill in the old one.
Related
- Settings - the migration banner in the new form
- Lifecycle - when each event runs
- Javascript APIs - replacing the classic
dnnsfcalls
Last updated: November 18, 2026