Seiten · Laravilt
Forms
Collect input or show record details in an action modal.
Modal form
schema() (or its aliases form() and modalFormSchema()) adds form fields to the modal. The submitted values arrive in $data.
php
Prefill the form
php
Use defaultFormData([...]) for defaults that don't depend on a record.
View-only modal
Show infolist entries without a submit button:
php
API reference
| Method | Description |
|---|---|
schema() / form() / modalFormSchema() | Form fields in the modal |
fillForm(Closure) | Initial values from the record |
defaultFormData(array) | Initial values without a record |
modalInfolistSchema() | Read-only entries |
isViewOnly() | Hide the submit button |