John
Custom field with multiple checkboxes
Eventually I found out that I can use
in the custom layout component blade, instead of
@foreach ($getChildComponents() ...
{{ $getChildComponentContainer() }}
.
Now I can apply my custom layout/styling "inside"/"between" the default or custom components provided by ->schema([...])
, instead of only "around" the fully rendered set of child components.22 replies
Moving route registration removes theme css styling
After some more investigation:
Every request hits
Filament::registerViteTheme()
in service provider. Also the broken theme request.
But; the broken page only loads /filament/assets/app.css?id=ceb9a486dfc44ebe8adaa3bd510821e8
in network tab.
While all other pages load http://[::1]:5173/resources/css/filament.css
(and a bunch of custom stuff I put in the service provider).9 replies
Using form schema for PDF export
Sure. In
composer.json
, override ViewComponent.php
:
Copy the vendor ViewComponent.php
to your custom location. And change this part:
Then provide a custom blade for every component you use.
E.g. fieldset.blade.php
:
text-input.blade.php
:
11 replies
Why are disabled() fields validated? (e.g. required())
It indeed does add browser validation using the
required
attribute, but browser validation is skipped when the component is also disabled
. It's server validation that's skill kicking in, including a translated Fieldname X is required
error message.
The only difference between required()
and rules('required')
is that the latter doesn't give me the asterisk*. It still validates disabled fields.
I couldn't get requiredIf()
to work. But you lead me to another solution:
It's not very pretty to include that closure to every required field, but it's working. The whole form stays visible and editable, just the required validation is dropped when sending back.4 replies