As modal
Requires an Eloquent Model
Extend the TallFormInModal component
The modal can be placed anywhere but for
z-index
reasons, it's best to put it near the closing</body>
tag.The component automatically loads the model and resets the form when the listener receives the emitted event.
You have access to all TallForms methods and properties except the
$headView
.
Steps
Create the form
Command option --action=modal
will set the component to extend TallFormInModal.
See Standard form, for more options
Create a button and pass a $modelKey
Add a button to any blade view, that $emits
a $model->id
to your Form component
Add the modal form component
The button and the form component does not have to be in the same Livewire component, but for z-index reasons, it is best placed near the closing </body>
tag.
Button colors
Available presets: white, indigo, blue, green, yellow, red, gray, orange, teal, info, success, danger, warning, primary, secondary.
Set the colors in tall-form.css
Override methods
You can override the default methods
Styling
Search for Modals
in tall-theme.css
The modal styling is based on the Laravel Jetstream modal component.
Modal sizes
Set the
modalMaxWidth
in theformAttr()
function.Available options are;
sm, md, lg, xl, 2xl
Default =
lg
You can change the defaults in config.
Last updated
Was this helpful?