Antoine
Antoine
FFilament
Created by Antoine on 5/6/2024 in #❓┊help
Modal Bug on Livewire Component Form
up?
3 replies
FFilament
Created by Mir Dostogir Ahmed on 1/3/2024 in #❓┊help
In filament simple resource how i use "getCreatedNotification" ? and update time "getSavedNotificat
You can edit the notification in --single on the CreateAction on top right on ListRecords : CreateAction::make() ->successNotification(fn() => ...) Because all the controls of the modal are on this Action. Width, notification, ...
6 replies
FFilament
Created by Antoine on 1/12/2024 in #❓┊help
ColumnSpan : Array to string conversion
In a stand alone form, I tested in multi forms and I have the same error. Can you try in your app if this code on any field returns an error?
->columnSpan(fn() => [
'default' => 12,
'sm' => 12,
'md' => 9,
'lg' => 9,
'xl' => 9,
'2xl' => 9,
]),
->columnSpan(fn() => [
'default' => 12,
'sm' => 12,
'md' => 9,
'lg' => 9,
'xl' => 9,
'2xl' => 9,
]),
I suspect a code bug in Filament or my entire application... Thank's for help!
7 replies
FFilament
Created by Antoine on 1/12/2024 in #❓┊help
ColumnSpan : Array to string conversion
it's a Toggle and it returns true or false. I have the same error with :
->columnSpan(fn() => [
'default' => 12,
'sm' => 12,
'md' => 9,
'lg' => 9,
'xl' => 9,
'2xl' => 9,
]),
->columnSpan(fn() => [
'default' => 12,
'sm' => 12,
'md' => 9,
'lg' => 9,
'xl' => 9,
'2xl' => 9,
]),
and not error with :
->columnSpan([
'default' => 12,
'sm' => 12,
'md' => 9,
'lg' => 9,
'xl' => 9,
'2xl' => 9,
]),
->columnSpan([
'default' => 12,
'sm' => 12,
'md' => 9,
'lg' => 9,
'xl' => 9,
'2xl' => 9,
]),
So it's not the condition but I think it's the Closure...
7 replies
FFilament
Created by gustavo.dev on 1/12/2024 in #❓┊help
Input masking
How can I use a regex like this '/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/' with masks? It's ok for numbers like $money but not for a regex?
6 replies
FFilament
Created by Antoine on 12/30/2023 in #❓┊help
Is it possible to add a mask to an email?
Of course I can, and I already use it as such, but I'm not looking for a workaround when we have the mask() method and we don't use it to its full capacity. Hence my question, does the mask() method have this capability?
5 replies
FFilament
Created by Antoine on 12/3/2023 in #❓┊help
Access any field from form with anonymous action
Thank you Leandro, I was just looking for that!
7 replies
FFilament
Created by Antoine on 12/3/2023 in #❓┊help
Access any field from form with anonymous action
7 replies
FFilament
Created by Antoine on 12/3/2023 in #❓┊help
Access any field from form with anonymous action
This method only retrieves the value of my field. And this is the only interaction we can have with anonymous form functions. I am looking to be able to modify the appearance or retrieve information from my field. For example, I'm looking to access my field so I can make it disabled once I click my anonymous action button. I know that there is this kind of method but I cannot access my component as it is not linked to my action. It's impossible for me to do anything.
->afterStateUpdated(fn (Select $component) => $component
->getContainer()
->getComponent('dynamicTypeFields')
->getName())
->afterStateUpdated(fn (Select $component) => $component
->getContainer()
->getComponent('dynamicTypeFields')
->getName())
https://filamentphp.com/docs/3.x/forms/advanced#dynamic-fields-based-on-a-select-option
7 replies
FFilament
Created by Antoine on 10/5/2023 in #❓┊help
Actions in renderHooks
I understand. Is there a method to specify the function name to be interpreted? Something like this:
public function getViews()
{
return[
Action::make('table')
->actionName('tableAction')
->action(function() {
dd();
}),
Action::make('list')
->actionName('listAction')
->action(function() {
dd();
}),
];
}
public function getViews()
{
return[
Action::make('table')
->actionName('tableAction')
->action(function() {
dd();
}),
Action::make('list')
->actionName('listAction')
->action(function() {
dd();
}),
];
}
Otherwise do you know in which method the nameAction() are registered to understand how it works?
6 replies
FFilament
Created by Antoine on 10/5/2023 in #❓┊help
Actions in renderHooks
It seems that my problem is linked to an action name and function name. If I do it this way, it works but I multiply the functions which I don't like:
public function tableAction(): Action
{
return Action::make('table')
->action(function() {
dd();
});
}

public function listAction(): Action
{
return Action::make('list')
->action(function() {
dd();
});
}

public function getViews()
{
return [
$this->listAction(),
$this->tableAction(),
];
}
public function tableAction(): Action
{
return Action::make('table')
->action(function() {
dd();
});
}

public function listAction(): Action
{
return Action::make('list')
->action(function() {
dd();
});
}

public function getViews()
{
return [
$this->listAction(),
$this->tableAction(),
];
}
If I name a function with a name different from the action name. It doesn't work anymore but my view show correctly but not the method action() :
public function tableAction(): Action
{
return Action::make('newNameTable')
->action(function() {
dd();
});
}
public function tableAction(): Action
{
return Action::make('newNameTable')
->action(function() {
dd();
});
}
6 replies
FFilament
Created by Albert Lens on 9/5/2023 in #❓┊help
Error getEditOptionActionFormData when using editOptionForm in Select without a relationship
same problem. Have you resolve this bug ? An attempt was made to evaluate a closure for [App\Forms\Components\Select], but [$data] was unresolvable.
12 replies
FFilament
Created by Antoine on 10/1/2023 in #❓┊help
createOptionUsing() doesn't select new value
It seems a bug... Same problem https://discord.com/channels/883083792112300104/1148925136553123850/1148925136553123850 and I resolve it with :
->searchable()
->preload()
->searchable()
->preload()
4 replies
FFilament
Created by AngryTestie on 9/28/2023 in #❓┊help
How to get the id of the data created using createOptionUsing()
->createOptionUsing(function(array $data) {
dd($data);
// Create manually your new row in your pivot model and access to $model
$model = Model::create($data);
return $model->id;
})
->createOptionUsing(function(array $data) {
dd($data);
// Create manually your new row in your pivot model and access to $model
$model = Model::create($data);
return $model->id;
})
5 replies
FFilament
Created by Antoine on 9/28/2023 in #❓┊help
How to add requiresConfirmation() into modalSubmitAction() in Action
Thank's @Patrick Boivin, it works! I've find an another way to do that with : Add this action in modal with modalSubmitAction, etc... :
->action(function ($data) {
$this->replaceMountedAction('save', $data);
});
->action(function ($data) {
$this->replaceMountedAction('save', $data);
});
And create a function who called when the submit button triggered with passing $data to $arguments :
public function saveAction(): Action
{
return Action::make('save')
->requiresConfirmation()
->action(function (array $arguments) {
$data = $arguments;
dd($data
});
}
public function saveAction(): Action
{
return Action::make('save')
->requiresConfirmation()
->action(function (array $arguments) {
$data = $arguments;
dd($data
});
}
But I prefer your method! There is no cleaner native method to retrieve the parent's form? Or execute the parent's action from children like this :
Action::make('test')
->requiresConfirmation()
->executeParentAction()
Action::make('test')
->requiresConfirmation()
->executeParentAction()
9 replies
FFilament
Created by Antoine on 9/28/2023 in #❓┊help
How to add requiresConfirmation() into modalSubmitAction() in Action
Or a method to call parent action?
9 replies
FFilament
Created by Antoine on 9/28/2023 in #❓┊help
How to add requiresConfirmation() into modalSubmitAction() in Action
I have a code like this who works but I can't get datas from parent form :
->modalSubmitAction(false)
->modalCancelAction(false)
->extraModalFooterActions([
Action::make('close')
->close(),
Action::make('save')
->requiresConfirmation()
->action(function (array $data) {
dd($data);
}),
])
->form(...)
->modalSubmitAction(false)
->modalCancelAction(false)
->extraModalFooterActions([
Action::make('close')
->close(),
Action::make('save')
->requiresConfirmation()
->action(function (array $data) {
dd($data);
}),
])
->form(...)
An idea?
9 replies
FFilament
Created by Antoine on 9/28/2023 in #❓┊help
How to add requiresConfirmation() into modalSubmitAction() in Action
This is for v3
9 replies
FFilament
Created by Antoine on 8/10/2023 in #❓┊help
Reset in columns toggleable?
13 replies
FFilament
Created by Antoine on 8/10/2023 in #❓┊help
Reset in columns toggleable?
I want to add a button at the end of the toggle button or filters. I searched in the documentation but Filament doesn't have renderHooks in the toolbar header table. So I created lots of simple render hooks that work like a charm in the toolbar header table. This would make Filament even more flexible but I don't know if @Dan Harrin is interested by this option. If he is interested, I propose me to make a pull request and add the renderHooks to the documentation? It's only renderHooks like this : {{ \Filament\Support\Facades\FilamentView::renderHook('panels::resource.pages.list-records.table.filters.end', scopes: $this->getRenderHookScopes()) }}
13 replies