xy
xy
FFilament
Created by xy on 10/20/2024 in #❓┊help
How to make sure only one navigation group gets uncollapsed
How to make sure only one navigation group is uncollapsed in my panel at any given time. So if i toggle one navigation group, all others become collapsed.
2 replies
FFilament
Created by xy on 10/19/2024 in #❓┊help
Using emoji picker to create an emoji only field
I'm trying to create a new field which only allows Emoji rather than emoji + text. Have looked into this package: https://filamentphp.com/plugins/tangodev-emoji-picker Has anyone achieved something similar already?
1 replies
FFilament
Created by xy on 10/27/2023 in #❓┊help
Simple file upload field
Does filament have a simpler file upload field (Upload button with file name /size preview once uploaded) built in (without filepond drag/drop)? On a page with many file fields, it looks quite cluttered. Thanks
7 replies
FFilament
Created by xy on 9/2/2023 in #❓┊help
Action button - copy to clipboard
Hi Is there a way to use copyable() on an action button click? Or best approach is still to create a custom component to achieve this?
3 replies
FFilament
Created by xy on 8/31/2023 in #❓┊help
SpatieMediaLibraryFileUpload: Display original file name
Hi Any ideas on how I can display the original file name when using SpatieMediaLibraryFileUpload? On upload it says original file name but when editing the file field, it shows stored file name.
Forms\Components\SpatieMediaLibraryFileUpload::make('file
->disk('local')
->collection('files')
->multiple(false)
->previewable(false)
->required(),
Forms\Components\SpatieMediaLibraryFileUpload::make('file
->disk('local')
->collection('files')
->multiple(false)
->previewable(false)
->required(),
8 replies
FFilament
Created by xy on 8/29/2023 in #❓┊help
hiddenLabel() not working on Action
The hiddenLabel() method is not working on table actions.
$table->actions([
Tables\Actions\EditAction::make()->hiddenLabel(),
Tables\Actions\DeleteAction::make()->hiddenLabel(),
])
$table->actions([
Tables\Actions\EditAction::make()->hiddenLabel(),
Tables\Actions\DeleteAction::make()->hiddenLabel(),
])
Label still appears next to icon.
3 replies
FFilament
Created by xy on 8/29/2023 in #❓┊help
Disable relationmanager tabs
I have 2 relation managers under my EditRecord page. How can i disable the tabs? I just want them listed one after the other.
22 replies
FFilament
Created by xy on 8/29/2023 in #❓┊help
Custom form field - Check if state has a value?
I'm creating a custom form field which extends the Radio field. How can i check if state has a value in the view? The idea is to dynamically hide something if state has a value.
8 replies
FFilament
Created by xy on 8/27/2023 in #❓┊help
Notifications - wire to tenancy
Can the notifications be wired to tenant instead of user?
3 replies
FFilament
Created by xy on 8/26/2023 in #❓┊help
New widget not working
Im using a new widget for a render hook and seeing this error:
Using $this when not in object context
Using $this when not in object context
Widget code:
<x-filament-widgets::widget class="fi-filament-info-widget">

</x-filament-widgets::widget>
<x-filament-widgets::widget class="fi-filament-info-widget">

</x-filament-widgets::widget>
<?php

namespace App\Filament\Widgets;

use Filament\Widgets\Widget;

class Sidebar extends Widget
{
protected static string $view = 'filament.widgets.sidebar';
public array $actions = [];

public function mount(): void
{
$this->actions = [];
}

public function getColumnSpan(): int | string | array
{
return [];
}

public static function getSort(): int
{
return -1;
}
}
<?php

namespace App\Filament\Widgets;

use Filament\Widgets\Widget;

class Sidebar extends Widget
{
protected static string $view = 'filament.widgets.sidebar';
public array $actions = [];

public function mount(): void
{
$this->actions = [];
}

public function getColumnSpan(): int | string | array
{
return [];
}

public static function getSort(): int
{
return -1;
}
}
6 replies
FFilament
Created by xy on 8/26/2023 in #❓┊help
Add action to sidebar navigation
7 replies
FFilament
Created by xy on 8/26/2023 in #❓┊help
Custom action not working
I have a custom action to create a new post which I want to use throughout my application on different pages. If i make the same action with Action::make() under my custom page's getHeaderActions, it works but when using my custom action class it doesn't:
<?php

namespace App\Filament\Actions\Posts;

use Filament\Actions\Action;
use Filament\Actions\CreateAction;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\Textarea;

class NewPost extends Action
{

protected function setUp(): void
{
$this
->label('Make post')

->form([
Textarea::make('message')
->placeholder('Message...')
->required(),
]);
}
}
<?php

namespace App\Filament\Actions\Posts;

use Filament\Actions\Action;
use Filament\Actions\CreateAction;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\Textarea;

class NewPost extends Action
{

protected function setUp(): void
{
$this
->label('Make post')

->form([
Textarea::make('message')
->placeholder('Message...')
->required(),
]);
}
}
Used in page:
protected function getHeaderActions(): array
{
return [
NewPost::make('makePost'),
];
}
protected function getHeaderActions(): array
{
return [
NewPost::make('makePost'),
];
}
Error:
Class [App\Filament\Actions\Posts\NewPost] extends [Filament\Support\Components\ViewComponent] but does not have a [$view] property defined.
Class [App\Filament\Actions\Posts\NewPost] extends [Filament\Support\Components\ViewComponent] but does not have a [$view] property defined.
Why do i need a view? And what am i supposed to add into the view?
3 replies
FFilament
Created by xy on 8/18/2023 in #❓┊help
Is it possible to open modal with form fields in hint action?
I've tried but it doesn't open the moda with form (text input):
TextInput::make('name')->live(debounce: 500)->label('name')->hintAction(
Action::make('generate')
->icon('heroicon-o-arrow-path')
->form([
TextInput::make('Keywords')->nullable(),
])->action(function (Set $set) {
// do something
})
)->required()
TextInput::make('name')->live(debounce: 500)->label('name')->hintAction(
Action::make('generate')
->icon('heroicon-o-arrow-path')
->form([
TextInput::make('Keywords')->nullable(),
])->action(function (Set $set) {
// do something
})
)->required()
19 replies
FFilament
Created by xy on 8/14/2023 in #❓┊help
Make some items in CheckboxList disabled
I have several options in a checkboxlist. I want to disable the input (checkbox) for some of those options. Any idea how to achieve this?
5 replies
FFilament
Created by xy on 8/14/2023 in #❓┊help
Display table action when using RelationManager on ViewRecord
I'm currently using a RelationManager which shows on the ViewRecord page. Custom Action under headerActions shows however, the Tables\Actions\CreateAction action does not.
->headerActions([
Tables\Actions\Action::make('addTest')
->label(__('Add Test'))
->form([
Forms\Components\Textarea::make('content')
->translateLabel()
->required(),
]), // This shows
Tables\Actions\CreateAction::make(), // This does not
])
->headerActions([
Tables\Actions\Action::make('addTest')
->label(__('Add Test'))
->form([
Forms\Components\Textarea::make('content')
->translateLabel()
->required(),
]), // This shows
Tables\Actions\CreateAction::make(), // This does not
])
Is there any way for that to show on this page?
4 replies
FFilament
Created by xy on 8/14/2023 in #❓┊help
InfoList icon not showing when state is null
Infolists\Components\TextEntry::make('email')
->icon('heroicon-m-envelope')
->iconPosition(IconPosition::After);
Infolists\Components\TextEntry::make('email')
->icon('heroicon-m-envelope')
->iconPosition(IconPosition::After);
Any ideas?
7 replies
FFilament
Created by xy on 8/12/2023 in #❓┊help
Hide create button on resource creation form with wizard
I'm using a wizard on a form. I have followed the steps here to add my own submit action: https://filamentphp.com/docs/3.x/forms/layout/wizard#rendering-a-submit-button-on-the-last-step How can i hide the default 'create' button at the bottom of the form? I managed to hide the create another using the following on the CreateResource page: $canCreateAnother = false
6 replies
FFilament
Created by xy on 8/11/2023 in #❓┊help
Select field with relationship - exclude current record from options
Using the Forms\Components\Select with ->relationship(...), is it possible to exclude current record from the list?
3 replies
FFilament
Created by xy on 8/9/2023 in #❓┊help
Open modal before create action
Is it possible to : 1) open a modal with fields when initially pressing the create resource button? The idea for this is to take in some contextual information (choosing a template for the form). 2) open a modal when form is submitted on create resource page before the resource is created. There will be an option on the modal to create a different resource upon creation. I want to use the option to create a different resource.
6 replies
FFilament
Created by xy on 8/9/2023 in #❓┊help
hiddenOn alternative for Action
Is there a hiddenOn alternative for Filament\Forms\Components\Actions\Action? I want to hide a form action on edit.
5 replies