Interface
The Interface determines how singular records are displayed and edited. It controls the detail view panel that opens when a user clicks on a row in a data table.
Auto-generated Forms
By default, the form_codeblock field on a collection is null. In that
case, Minerva automatically generates a workable form at runtime based on the collection schema.
Custom Forms (form_codeblock)
For more complex apps, you can define a custom form_codeblock in Database Studio.
Use the Dynamic UI SDK to define the layout, and use only Dynamic UI registry elements rather than arbitrary HTML or framework components.
import { Params, ReturnType } from './data';
import { SDK } from './external';
export function run(params: Params): ReturnType {
return SDK.GlobalStore({
form_for: 'projects',
data: {
form: {
name: '',
status: 'Active'
}
},
ui: (store) => (
<flex direction="column" gap={3}>
<forminput label="Project Name" value={store.bind('form.name')} type={{ render: 'text' }} />
</flex>
)
});
} Binding Rules
When writing a form_codeblock, Minerva enforces a strict mapping between the schema
and the bound form fields.
CEL Expressions
You can use CEL for dynamic visibility, derived values, and conditional props within custom forms.
Render Modes
The detail view can render the same interface in view, update, and create contexts, so you do not need three different forms for the same collection.