Edit action
Introduction
Section titled “Introduction”EditAction is the row / header preset for updating a record. Defaults: name edit, label Edit, pencil icon, primary color.
from almasix.orbit.actions import EditActionfrom almasix.orbit.forms import TextInput
EditAction.make() .modal() .modal_heading("Edit post") .form([TextInput.make("title").required()]) .success_notification("Saved")

Point at a full page with .url(...) when you do not want a modal:
from almasix.orbit.actions import EditAction
EditAction.make().url(lambda record, **_: f"/posts/{record['id']}/edit")Filling the form
Section titled “Filling the form”When rendered with record=, field names hydrate from the record. Override with .fill_form(...):
from almasix.orbit.actions import EditAction
EditAction.make() .modal() .form([...]) .fill_form(lambda record, **_: {"title": record["title"].upper()})Lifecycle
Section titled “Lifecycle”from almasix.orbit.actions import EditAction
EditAction.make() .mutate_data_using(lambda data, **_: {**data, "updated_by": user_id()}) .mutate_record_data_using(lambda record, **_: record) .using(lambda record, data, **_: update_post(record, data)) .after(lambda record, **_: bust_cache(record))| Hook | Role |
|---|---|
.mutate_data_using |
Transform submitted data |
.mutate_record_data_using |
Touch / replace record before persist |
.using / .action |
Persist body |
.before / .after |
Gate and side effects |
On a table
Section titled “On a table”table.actions([ EditAction.make().modal().form(list(_FORM)),])