Ehsan
File upload with Livewire component
I am trying to use
SpatieMediaLibraryFileUpload
component with Livewire component in a filament form. I have followed steps as mentioned at https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component#setting-up-the-livewire-component to make the form work, but the files somehow are not getting uploaded.
The above element code works in filament v3 admin panel with a filepond component.
I am trying to save the data in a custom method with following code
It saves the data to database without the spatie media upload.
DDing $this->form->getState();
doesn't show the member_photos
element in it.4 replies
Url generation from BulkAction
I want to generate Identity Cards for selected members from my
MemberResource
The identity cards will be visible to user before printing on a new page.
I have created below bulk action to achieve the same. I have also created a custom page for this new route
.
This works and the member IDs are passed to this custom route comma separated. But this exposes IDs to end user.
I would like to convert the route to POST
instead of GET
so that I can pass the data to it.
Please help with the same or suggest any other way of achieving this.2 replies
Unable to use colors on blade components in livewire form component
I have created a livewire form component using docs from https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component
Inside the component, I am using a filament blade component like this
The problem is, that the button is rendered, without background color / border. The text is rendered in white properly though. I tried with other variants like
warning
, danger
etc, but nothing is displayed.
My tailwind.config.js
looks like this
The buttons are displayed correctly in the admin panel though.
I also tried to register the colors in boot()
method of AppServiceProvider
, but no result
6 replies
Disabling dark mode for form component
I have created a custom form component and embedded the component on a page. I have also disabled darkMode for the panel using panel configuration
->darkMode(false)
which has disabled the same on admin panel. But the form component added to a view is displayed in darkMode
.
I tried to disable the same using Javascript, but it doesn't work.
The form is basically using OS default theme instead, which in my case is dark.
I also tried with darkMode: 'class'
in tailwind.config.js
I am following this example https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component
Any help rendered will be appreciated.2 replies
Disabling dark mode for form component only
I have created a custom form component and embedded the livewire component on a page. The dark mode is enabled by default in filament config, but I want to disable it for this particular livewire form component. How to achieve that
6 replies
Help with custom resource page
I have created a custom resource page and added its entry in
getPages()
method like this:
'print' => Pages\PrintCouponBatch::route('/print/{record}')
I want the view for this page to use a custom layout. Also I am not able to access the $record
in the view. {{ $record }}
shows variable undefined whileas the doc says, the route param should be available in view.
Any help with this will be appreciated.6 replies
Update TextInput programmatically in reactive way
Hello guys,
I have a reactive Select component on form and I want to update value of a TextInput based on the onchange value of this Select element.
I tried to use value() method, but it sets the value only once on load and doesn’t change on Select changes.
Please help.
5 replies