Hello,
The only option I found is for each field that I wish to be hidden or shown I add a condition for hidden which checks if the select has a certain value.
Is there any way to activate this in the select and set all fields?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I created a custom livewire component and set HasForms and InteractsWithForms.
I created the method form with a wizard. In step 1 I know the company of the user. In step 2 he selects the category of products based on the company in step1.
After the category is selected I need a way to add to the form from that method a list of products each with a valability field and a checkbox to select it.
How may I add this in that method?
public function form(Form $form): Form
{
return $form
->schema([
Wizard::make([
Wizard\Step::make('Step 1')
->icon('heroicon-m-at-symbol')
->schema([
TextInput::make('email')
->email()
->required()
->in(User::pluck('email')->toArray()),
]),
Wizard\Step::make('Step 2')
->icon('heroicon-m-check-circle')
->schema([
Select::make('category')
->options(function() : array {
$options = Category::pluck('name','id')->toArray();
return $options;
})
->live()
->afterStateUpdated(function(Get $get, Set $set) {
// here I need to send to a Livewire component the selected category
}),
]),
// Here I need to add the Livewire component that will receive the data
]),
I looked into Filament custom fields https://filamentphp.com/docs/3.x/forms/fields/custom in order to create a custom Livewire class that will show the rest of the fields (products with valability field and checkbox) but it is not shown. The mount method is not activated at all. Also I could not find how to send a parameter to it from the form.
Any ideas?
I have quite a big form and I would like to do it with Filament and not recreate everything in livewire just because of this.
Thank you.
Please or to participate in this conversation.