The Milkman
The Milkman
FFilament
Created by The Milkman on 8/2/2024 in #❓┊help
Why does FileUpload not respect ->rules() ?
10 replies
FFilament
Created by The Milkman on 8/2/2024 in #❓┊help
Why does FileUpload not respect ->rules() ?
Maybe it's an idea to also accept 'extensions' instead of mimetypes. But the question is of Filepond will accept this.
10 replies
FFilament
Created by The Milkman on 8/2/2024 in #❓┊help
Why does FileUpload not respect ->rules() ?
Yes, internally is fine I guess. But when uploading a WOFF / WOFF2 file, the front-end validation always says that the uploaded file is of the wrong format, because my browser tells Filepond that it's mimetype is null... See this exellent reply on SO: https://stackoverflow.com/a/77856904/2815350
10 replies
FFilament
Created by The Milkman on 8/2/2024 in #❓┊help
Why does FileUpload not respect ->rules() ?
Well, serverside validation seems to fail too...
$this->validate([
'formData.font_woff2_filename' => 'mimetypes:font/woff2,application/font-woff2',
'formData.font_woff_filename' => 'mimetypes:font/woff,application/font-woff',
]);
$this->validate([
'formData.font_woff2_filename' => 'mimetypes:font/woff2,application/font-woff2',
'formData.font_woff_filename' => 'mimetypes:font/woff,application/font-woff',
]);
...because Laravel's validator expects an actual File or UploadedFile. And all we get from FileUpload/Filepond is this: ["c97b1b35-ebc0-48bf-8258-bedbd02c123c" => "01J48ZGS4EMBSFS4Z3HSMPF1P4.woff2"] So no validation of possible...
10 replies
FFilament
Created by The Milkman on 4/24/2023 in #❓┊help
Auto-jump to next step in Wizard
Ok, i'm stupid. I had placed my form inside a form what was causing the troubles 😦
<form wire:submit.prevent="submit">
{{ $this->form }}
</form>
<form wire:submit.prevent="submit">
{{ $this->form }}
</form>
Don't do this 😉
2 replies
FFilament
Created by The Milkman on 4/19/2023 in #❓┊help
Set MorphToSelect to a value in mount()
Oh haha, the moment I posted this, I found a solution 😉
$this->form->fill([
'recipient_type' => User::class,
]);
$this->form->fill([
'recipient_type' => User::class,
]);
Or, if you are using Morphmaps, use something like this:
'recipient_type' => User::make()->getMorphClass()
'recipient_type' => User::make()->getMorphClass()
3 replies
FFilament
Created by Augus on 3/3/2023 in #❓┊help
Is this a bug or intended behaviour? (Select relationship)
@busybeard ?
25 replies
FFilament
Created by The Milkman on 4/13/2023 in #❓┊help
Related Select-field behaving weirdly when ->searchable() is added
2 replies
FFilament
Created by The Milkman on 4/5/2023 in #❓┊help
Trigger a single action on another place (in the table-header)
Well, that's the implementation that can be done with the form builder I guess. But I want a nice modal at this stage, in the Table context.
4 replies