Skip to content

Build an in-place CRUD form

Use a form block for the create operation and set source.target_mode to "create" (the documented default) with the target model_id. Add a clear on_success_toast so the user receives an immediate confirmation after the write.

Inside the form, bind each input to its model field with binding.field and save_mode: "submit", then include a button whose display type is submit. The documented example uses this shape to create a record from the submitted values.

Keep create and edit intent explicit: the form source uses target_mode: "edit" for PATCH behavior and needs the target record_id; use target_mode: "delete" only for an intentional delete control.

After a successful form write, the client cache is updated and data blocks re-render without a page reload unless on_success_redirect is configured. Pair the form with a model-backed list on the same page to make the create result visible in the normal CRUD flow.