Ali Abbas
I have a OrderResource i want to have different forms for each create and edit order page?
how can i have this functionailty in orderResource i have this function like
public static function form(Form $form): Form
{
return $form->schema((new Pages\CreateOrder())->createForm());
}
this is working fine i want to change for edit but it is using this form for both craete and edit pages for edit i want likepublic static function form(Form $form): Form
{
return $form->schema((new Pages\CreateOrder())->createForm());
if(editpage){
return $form->schema((new Pages\EditOrder())->editForm());
}
}
i want like this9 replies
How to conditionally set a field as non-required based on the value of another field?
I have a checkbox ('location_type'), and I want to remove the 'required' constraint from a subsequent field ('name') if the checkbox is checked, utilizing the reactive() method. The relevant code snippet is as follows:
Checkbox::make('location_type')->inline()->reactive(),
TextInput::make('name')
->required()
->maxLength(191)
->columnSpan(1),
4 replies
I have a ViewColumn in getTables and i have 3 columns inside this view how can i make it searchable
i am using like this is not working
ViewColumn::make('product_id')
->label('Product ID')
->sortable()
->searchable(query: function (Builder $query, string $search): Builder {
return $query
->where('asin', 'like', "%{$search}%")
->where('upc', 'like', "%{$search}%")
->where('fnsku', 'like', "%{$search}%");
})
->view('filament.tables.columns.product.product_id'),
8 replies
Is there is a way to add loader or spinner in reactive fields ?
i am using reactive function for fields to visible on specific state value when i select the values using ->visible() to show hide input. fields it take little bit time to show fields i want to add the loader or spinner so the user understand easily ?
8 replies