Skip to content

ModelActionForm ​

Overview ​

Wraps ActionForm to execute a named action (such as delete or a custom bulk operation) against one or more model instances. It displays the selected objects, a confirmation message, and handles submission, dry-run validation, and post-action redirect to the appropriate list or detail view.

Renders a tone-tracked confirmation card with a banner, a selected-objects chip-row panel, and a confirm-prompt panel. The page prop renders the same parts as a routed page instead: the confirm button moves into the sticky action bar and the parts sit in the page gutter, as the detail views lay out a page. The action views and ViewDestroy set page. The bare prop suppresses the card chrome and banner, for a host that wraps the form in a card of its own.

Theme entry: ModelActionForm

Props ​

NameTypeRequiredDefaultDescription
iconOverrideObjectnullA partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants.
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
appstringyesDjango app label that owns the model.
modelstringyesDjango model name the action targets.
actionstringyesAction identifier (e.g. "delete" or a custom action name) sent to the server.
pkstring|number|arrayundefinedPrimary key or primary keys used when selected objects have not been fetched yet.
actionVerboseNamestringundefinedHuman-readable action name shown in confirmation and result messages; defaults to a title-cased version of action.
actionSuccessSummarystringundefinedToast summary shown on successful action completion; auto-generated from the action and model name if omitted.
actionErrorSummarystringundefinedToast summary shown when the action fails; auto-generated from the action and model name if omitted.
confirmMessagestringundefinedConfirmation message shown to the user before submitting; auto-generated from the action and model name if omitted.
fetchStateobjectundefinedReactive fetch state object providing the list of selected objects and their data. Without it, the form looks the selected records up by primary key so its chips can show their formatted names. That lookup is for display only and never changes which records the action targets.
instanceListobjectundefinedreactive-helpers list instance holding the selected objects. Bulk actions use it so a real destroy reconciles the rows the caller is showing. Omit it to use a private transport-only list.
transformSubmitDataFnfuncundefinedOptional function to transform form values before they are sent in the request body.
requestMethodstring"PUT"HTTP method used for the action request (ignored for destroy actions, which always use DELETE).
enableDryRunbooleantrueWhen true, performs a dry-run validation request before the final submission.
tonestring"info"Sentiment tone that drives the banner and card accents. One of info (default confirmations), success (activate / restore), warning (irreversible non-destructive), or danger (destructive). danger also gives the default confirm button the destructive tone; the others keep it primary. Routed via data-tone on the card root and consumed by Tailwind v4 group-data-[tone=…]/model-action-form: variants.
bannerTitlestringundefinedOptional banner title; defaults to a sentence built from action + model name.
bannerDescriptionstringundefinedOptional banner description; defaults to "Review the selected records before continuing."
barebooleanfalseWhen true, suppress the card chrome and tone-tracked banner, for a host that wraps the form in a card of its own.
pagebooleanfalseWhen true, the form fills a view's page rather than sitting in a card. The confirm button moves into a top-zone StickyBar beside the page title, and the cancel button is left out, because the view's Go Back action already leaves the page. Without bare, the card chrome is also dropped: the banner, selected records, and confirm prompt sit directly in the view's gutter.
confirmTextstringundefinedLiteral phrase the operator must type before the confirm button enables. When set, a TypedConfirmField renders inside the body (after any extra-fields slot content) and the submit button is gated until the typed value matches. Leave undefined to skip the type-to-confirm gate.

Slots ​

NameScopedDescription
confirm-buttonyes
action-banneryesOverride the tone-tracked banner shown above the confirmation body. Only rendered when bare is false.
banner-metayes
selected-objectsyesOverride the list of selected objects shown above the confirmation form.
link-itemyesOverride the link rendered for each selected object in the default list.
confirm-messageOverride the confirmation prompt shown before submitting.
extra-fieldsyes
form-confirm-dialog-warningsyes
warning-entryyes

Full slot reference

Source ​

client/lib/views/ModelActionForm.vue