Tjiel
How can I create a checkbox filter that includes more records when active
Hey all I want my user to be able to enable inactive records using a filter. I currently do it like this:
The problem is that i want it to be a checkbox, when unchecked the inactive records should not be shown, when checked they should be shown. If you know a way I can have the same functionality but instead use a checkbox, please let me know.
5 replies
How can I change the width of individual statsoverview stats?
Hey all, im trying to have a stats overview widget which consists of 2 stats to take up the full width, the problem is that I can't find out how.
okay if I for example have this basic stat it takes up 2/3 the width of the page. Instead of this I want it so that it takes up full space and not have 2 stats that take up each 1/3th of the page.
I already tried to do something with the columspan, but that is for the whole widget, so then each takes 1/3 of the columnspan that has been asigned.
If anyone can help me out to individually change the width, so I will be able to make them both take 50% of the width, or any other posible solution, it would be really appreciated.
7 replies
Duplicate query problem when using a relationship in a repeater
Hey all, I have the following repeater:
But the problem is that for each answer the section query is performed instead of it being performed once. Is there a good way to make it so the following query: select * from sections where sections.id = 15 limit 1, is only being made once instead of for each answer once.
2 replies
Spatie tag name text input field
Hello all, I have created a resource for the spatie tag model:
I want the user to be able to change the name of the tag, the problem is that it is saved like the following: {"nl": "test"}. So with the above code I get [object Object], and when I try to submit it, I get the following errror:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.name' doesn't exist.
Then I tried to do the form like this.
This did fill the field with the string I wanted it to fill with, but still the same error ocurs.
Any help would be really appreciated.
6 replies
Looking for a way to search table based on custom state
Hello all I have the following Textcolumn:
The problem is that currently, when searching, an error occurs. This is because you can obviously not saerch a direct relation. But my question is if there is a work around to make it so you can search for both columns at the same time, in this case the object->name column and the object->mainObject->name column.
6 replies
Accessing the state of the repeater from inside the repeater
Hey all, I am currently working on a form that has a repeater somewhat like this:
In the select called required_question I want to reference a different question from the repeater. I was trying to do this by using $get('questions'). But this results just in a null since its looking for a field called 'questions' in the repeater, which obviously does not exist.
So the thing I would like to know is how can i get the values of the other questions as options in my required_question?
Any help would be really appreciated, if there are any questions about my problem im happy to provide answers.
4 replies
Removal of scrollbar in the sidebar
Hey all, on some smaller screens the resources in my sidebar are to much to be in one view. So a scrollbar appears. Is there any way to make it hidden. I have already tried the following but nothing seems to be happening.
Any help would be appreciated!
4 replies
Updating placeholder text afterStateUpdated
Hey all, I currently have. a form where the user can optinally a select a relationship. If the relationship is present it will use the value of the fields from that relationship. Unless the corresponding field is filled in the current form. The problem is that i want to display the values of the relation to the user but not fill the field to do that. So I want to change the placeholder after the state update.
currently i have the following:
At the moment it just updates the value. What i want instead is that it will update the placeholder of the name field instead.
Is there any way to do this?
6 replies
How can I display a file uploaded using the spatie media library on the info list page
Hey all!, in my filament project I'm making use of of the spatie media library for filament (https://filamentphp.com/plugins/filament-spatie-media-library). Although there is a way to display an image on the infolist, as specified in the documentation. I can not find a way to display non-image files with just a file name and a download button.
If anyone knows how I might be able to do this or something else that is similar, please let me know.
2 replies
Embedded youtube video in rich editor
Hey all, I want the user to be able to add an embedded youtube video to the rich editor. Is there any way to do this using the rich editor filament provides, or are there any alternative plugins that offer this functionality.
2 replies
Looking for a way to change the logo based on the tenant.
Hey all, I am currently working on a project with multi tenancy, the tenant is based on the domain. As of now I have done the tenant styling using a middleware I made, here is the start of it:
This is working as intended but when I looked up on how to change the logo (preverably in a similar way), I could not find anything. So my question is if anyone knows how I might add functionality to my theming middleware, so I can update the logo using the tenants logo. Of course any recommendations for doing it outside the middleware are also welcome.
4 replies
Is there a way to use the filament colors in a custom theme
Hey all, I am working on a project with multi tenancy and I want to use the tenant's colors to be used in a custom theme.
Currently I have a middleware to set the filament colors:
This is working great, but the problem i'm having is that I want to change the colors of the sidebar, topbar and more. I already have created a custom theme, here is the start of it:
So basicly my question is, how can I use the registered primary color in the theme.css, so I can for example change the background color of the sidebar.
17 replies
How to change capitalization on model label?
Hey all a resource for my model QrCodes, in this model I have set the model label the following way:
The problem im having is that its displaying Qr Access Codes instead of QR access codes.
According to the documentation you can prevent default the default capitalization in the following way:
https://filamentphp.com/docs/3.x/panels/resources/getting-started#automatic-model-label-capitalization
But variable is not reconized and doesn't do anything. So my question is if anybody knows how I might solve this problem.
13 replies
Looking for a way to display files from spatie media library in the infolist.
Hey all, Im currently creating an infolist for a resource that has multiple file uploads, the image uploads I can display fine using the document infolist entry (https://filamentphp.com/plugins/filament-spatie-media-library#infolist-entry).
The problem comes when I need to display different files on the infolist. So my question is if there is a way to show these filenames and make them downloadable? and if so, how can I do that?
1 replies
Looking for an openinghours form field in filament
Hey all,
Im currently migrating a project from nova to fillament.
In my nova project I have the following package for an OpeningHours input field: SadekD\NovaOpeningHoursField\NovaOpeningHoursField. So my question is the following: Is there any good alternative package to do something similar using Filament.
9 replies
Image saved to AWS bucket not displayed on infolist.
Hey all, I have a form with the fileupload:
When submitting it seems to be working fine, the problem is that whenever I go to the view page, the image is not displaying. When inspecting, the img element doesn't have an src (<img src style=").
This is what im trying in my infolist:
So if anyone knows a possible solution, please let me know. If i should clarify some more, please let me know and I'm happy to do so.
3 replies
How can I make a filter not changeable by the user?
I have filter that has a default value, the problem is that the user can change this filter, which I don't want the user to be able to do. I prefer a way to make it so the user doesn't see there are filters and there is no filter icon to be clicked on. But it would also be good enough if the user just could not change them.
5 replies
Parameter being null after table action
I have a widget that refreshes the page with a custom parameter. I use this parameter to manipulate a different widget, which needs a page refresh. And to update the getTableQuery method.
This is working fine on the initial loading of the page, as you would expect the Request::query('location') is present and it applies the correct filters. The problem comes when trying to do a table action like delete, restore or any custom action. Then it is null, as i can see using the dd method. Why might this be and how can i make it so it will detect the location.
7 replies
Change default table query to get only the soft deleted records
Hello all,
For a project im working on I need my table results to only show the soft deleted records.
I want it so that instead of currently returning the default parent::getTableQuery instead a where or something like that that makes it so it only gets soft deleted records.
9 replies