phydeaux
phydeaux
FFilament
Created by phydeaux on 3/21/2024 in #❓┊help
Wizard header layout
No description
2 replies
FFilament
Created by phydeaux on 3/14/2024 in #❓┊help
How to get the value of sibling in an Infolist RepeatableEntry
I'm trying to customize the label and/or hide an field based on the value of another field in the repeater by passing in a closure. So, hide field2 if field1 == 'Foo'. What can I pass into the closure to get the value of field1?
2 replies
FFilament
Created by phydeaux on 3/12/2024 in #❓┊help
Wizard submitAction button doesn't do validation or submission
Using a wizard in a Livewire component. I can put a wire:submit on the form tag in the blade template for the component and that works as expected. But that means I have to have a separate set of validation for just the last step, right? And the form state ends up looking very different if I do $this->form->getState() in the Livewire component than it does between steps in the Form component. So I guess the question is: Is this the expected behavior or am I doing something wrong?
3 replies
FFilament
Created by phydeaux on 3/1/2024 in #❓┊help
Radio button layout based on media breakpoint?
Is it possible to have ->inline() at larger screen sizes but not on small ones? The options wrap fine when things get too small but on some mobile screens you end up with some wrapping and some not. My gut and a quick look at the code says it can't be done but it never hurts to ask.
4 replies
FFilament
Created by phydeaux on 2/29/2024 in #❓┊help
Can you override form wizard color?
I found how to change the action buttons but is there a way to change the colors of the step header elements other than specify each piece in app.css? (This is front end outside of any panel.)
5 replies
FFilament
Created by phydeaux on 2/28/2024 in #❓┊help
requiredWithoutAll() validation being ignored
I'm using a Form Builder form in a regular Livewire component. Simple validations on the fields (required, email) work fine. But I have three fields with a requiredWithoutAll rule for the other two. So field1 has
->requiredWithoutAll('field2,field3')
->requiredWithoutAll('field2,field3')
. These rules get ignored. No error messages and nothing in the logs. Just goes along and submits without any issue. I can put a secondary validation in the Livewire component itself which does catch them but it (a) makes for an ugly UX difference and (b) for some reason, custom error messages aren't working there. Any ideas why these rules aren't getting triggered?
4 replies
FFilament
Created by phydeaux on 2/22/2024 in #❓┊help
Custom EditProfile page not rendering the form
I'm building a jobs management and application site and I want to force the user to an Applicant Profile page before they can do anything else. This uses an Applicant model that's a relation to their User object. I have the form working as a regular Livewire component/view with a Filament form but I was getting some strange behavior with validation. So I'm trying to fit it into Filament's auth profile feature to see it that fixes it. First, I know the custom EditProfile class is getting used. The properties/methods that I am overriding (heading and isSimple) are being used correctly. And in the form() function, I can dd and see the Form object that's being created and returned. But I'm not getting the form rendered on the page. Just a big blank space after the heading. Any ideas why? Second, is this even a decent way to handle this? Is it assumed that EditProfile is using a User object? I currently have
->model($this->getUser()->applicant ?? Applicant::class)
->model($this->getUser()->applicant ?? Applicant::class)
since I'm not actually going to change anything about the User object. Should I feed it the User instead and use the relationship for the applicant data? I'm really hoping to avoid going back to the standalone form and wrestling with the validation issues.
1 replies
FFilament
Created by phydeaux on 2/16/2024 in #❓┊help
Multiple authentication methods?
Is it possible to use different authentication methods for front end panel users vs. admin panel users? I need to allow normal user registration and login for the general public and authenticate our internal users against our SSO provider. This is my first Filament app and I've never done both even on a plain Laravel site. Is it possible or do I have to split this into two distinct apps? On a related note, I have a basic solution for the SSO side in Laravel by changing where the Authenticate middleware points. But do I need to do anything specific to tell Filament to use that? Am I really overthinking this? Or is the whole thing as simple as duplicating that middleware and having an admin version and a normie version?
4 replies