SirFat
SirFat
FFilament
Created by SirFat on 2/13/2025 in #❓┊help
How would I go about having a text field use a loading indicator
Yeah it kind of worked, as usual about five minutes after I finally succumbed to contacting the brains trust. I did see that link before. Handy because it means I’ll delve more into live wire tricks. The end time for the animation seems very quick, not in line with the sleep I had in afterStateUpdated. I’ll tinker some more because a clean generic solution to this I think would be useful in many of my applications - cheers!
4 replies
FFilament
Created by SirFat on 2/4/2025 in #❓┊help
'State path' in form injected within repeater reverts to parent path.
The only 'gotcha' I found is that unless the relationship model is a 'BelongsToMany' - the form does not save changes. Added the extra pivots and off we go.
3 replies
FFilament
Created by SirFat on 2/4/2025 in #❓┊help
'State path' in form injected within repeater reverts to parent path.
Actually, I may have solved my own problem. * Moved all the fields into their own method. Called that static method from both locations.
public static function form(Form $form): Form
{
return $form
->schema([
self::baseForm($form)
]);
}

public static function baseForm() : array {
return [
Select::make("country_id")
->inlineLabel()
->label("Country")
->required()
];
}
public static function form(Form $form): Form
{
return $form
->schema([
self::baseForm($form)
]);
}

public static function baseForm() : array {
return [
Select::make("country_id")
->inlineLabel()
->label("Country")
->required()
];
}
and
->schema([
Forms\Components\Group::make()->schema(AddressResource::baseForm()),
Forms\Components\Group::make()->schema([Toggle::make('primary')->label("Primary?")->live()->required()->distinct()->fixIndistinctState()])
]),
->schema([
Forms\Components\Group::make()->schema(AddressResource::baseForm()),
Forms\Components\Group::make()->schema([Toggle::make('primary')->label("Primary?")->live()->required()->distinct()->fixIndistinctState()])
]),
3 replies
FFilament
Created by SirFat on 7/20/2024 in #❓┊help
Validation/Pre-Action on Submit within a Wizard
To clarify my submitAction use - I use a custom blade to render the button per the guide. I attempted to perform validation in there but I couldn’t use Set because at that point in the flow the form element has not yet been initialised. Perhaps that’s because the blade button side-steps all validation hooks?
3 replies
FFilament
Created by SirFat on 7/20/2024 in #❓┊help
Validation/Pre-Action on Submit within a Wizard
If there isn't anything out the box, I wonder if looking into the listener-registration or creating a setSubmitAction that accepts a Closure may be of value, or whether that's against the spirit of the way it's written. I can see I can pass '$action' into submitAction() - but I cannot ascertain where '$action' would be constructed to have it passed as an argument, which is possibly also an oversight/misunderstanding on my part
3 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
Cheers - good, one step forward. Now just to find the $379 to buy the cheat sheet to the styled radio group =]
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
rather than trying to drill in further, which like you said, similar to a repeater, makes sense
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
Yeah, looks like it was a matter of getting the Custom field and then looking in there
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
That's the ticket.
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
No description
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
I would hazard a guess there is a science to it =]
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
is it a matter of experimentation or if I have xdebug and a breakpoint, should I just be looking at the structure of 'data' to understand the relationship?
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
that makes sense
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
gotcha
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
In TextInput::make('test_input_field') - the value of the Radio 'status' is accessible via $this->data["select_tech"]["status"] but not via $get("status")
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
That might make it easier to understand my gibberish 😛
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
I can however, find the data within the 'data' array.
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
Is there a trick within the blade/custom field to ensure the field is accessible via Get? I was able to use child components to reuse Filament fields versus build my own within the Custom field, I can see 'state' and 'old' state in what his 'afterStateUpdated', but the subsequent live check returns null on the $get attempt.
87 replies
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
heh cheers dude - you're getting one heck of a Xmas card at this point with the amount of times you've pointed me in the right direction (c:
87 replies