- pact.FormVirtualFields lists form fields that are not model columns: never bound, filled or projected; their values reach the Form hooks through cabana.VirtualFieldsFromContext when the field's context allows the operation - type: password is a masked field that must be listed as virtual - pact.FormRules supplies the rule set per operation and replaces the model's Rules() for admin saves; a rule on a virtual field sees the submitted value - preset on a text field follows another text field on the create form - SPA: PasswordField, preset handling in FormView, empty password left out of an update - README, docs, OpenAPI document, TS types and dist updated
33 lines
834 B
YAML
33 lines
834 B
YAML
fields:
|
|
name:
|
|
label: acme.roster::lang.people.name
|
|
type: text
|
|
span: left
|
|
email:
|
|
label: acme.roster::lang.people.email
|
|
type: text
|
|
span: right
|
|
slug:
|
|
label: acme.roster::lang.people.slug
|
|
type: text
|
|
preset: name
|
|
password:
|
|
label: acme.roster::lang.people.password
|
|
type: password
|
|
span: left
|
|
context: [create, update]
|
|
password_confirmation:
|
|
label: acme.roster::lang.people.password_confirmation
|
|
type: password
|
|
span: right
|
|
context: [create, update]
|
|
notify:
|
|
label: acme.roster::lang.people.notify
|
|
type: checkbox
|
|
default: true
|
|
context: create
|
|
joined_ip:
|
|
label: acme.roster::lang.people.joined_ip
|
|
type: text
|
|
context: preview
|