chrislcarr
chrislcarr
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
Ah OK, gotcha.
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
Please note that this is not happening when I use the <x-filament::modal> . . . </x-filament::modal> approach as described in https://filamentphp.com/docs/3.x/support/blade-components/modal. 🤔
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
Also, another very strange thing - when I click the "Lees mijn verbeteringen" Action button to trigger the modal, the content in "#typed-text" and "#katoo-plus-continue" is being completely wiped out and only leaving the "Lees mijn verbeteringen" Action button. Any idea why that's happening when the modal is opened?
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
Partially. I do indeed have a modal showing up now. However, of course, the code in resources/views/themes-modal.blade.php is no longer being generated because of DOMContentLoaded. Now that this is being brought in through a modal instead of a page, what should I use instead? Do I need to pass stuff in with ->action(fn () => '')? I've updated my gist with the current code that I'm using: https://gist.github.com/ChrisLCarrBF/77f718f07e5cd91650c1522b256925cc I do have another question ... * we've used the "Actions - Modals" approach (https://filamentphp.com/docs/3.x/actions/modals), * but since I'm not working with forms or anything but am rather just displaying content generated by javascript, * would it have been better to go with the "Core Concepts - Blade Components - Modal Blade component" approach (https://filamentphp.com/docs/3.x/support/blade-components/modal) instead??? * what are the differences?
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
Wow, this is super helpful. Thanks!
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
No, I didn't miss that. I just don't have the knowledge/experience of putting that in a different class since the example was using it in the Livewire component's view.
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
Yes, I had been trying to follow that but I could only get a button to show up in the Livewire component's view resources/views/livewire/themes-modal.blade.php. I need it in the widget. I was getting lost in translating the example's backend class specifics of a delete modal.
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
Duh. Right, of course! Sorry about that. I just added app/Filament/Widgets/KatooPlusThemes.php to my gist.
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
In my gist, I have a widget resources/views/filament/widgets/katoo-plus-themes.blade.php that is being displayed on the Dashboard. There is a button in that widget file that should open a modal when it is clicked on. That modal should contain the contents of my Livewire component's view resources/views/livewire/themes-modal.blade.php.
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
Hahahaha
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
No, it is inside of Filament admin. I have a widget that is rendered on the Dashboard. Within that widget, I have a button that should open a modal when its clicked on.
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
https://gist.github.com/ChrisLCarrBF/77f718f07e5cd91650c1522b256925cc I know this is a bit f'ed up because of stupid ChatGPT. ¯\_(ツ)_/¯ I'm just trying to get the contents of resources/views/livewire/themes-modal.blade.php to display in a modal when the "Open Themes Suggestions modal" button is clicked in resources/views/filament/widgets/katoo-plus-themes.blade.php. I didn't think it would be so hard ... so I'm feeling pretty stupid and nobody likes to feel that way. As a reminder, I am a frontend developer with limited experience working with backend PHP code, so please keep that in mind.
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
I know about ChatGPT, that’s why I said I was wasting my time. I’m exhausted now and it’s 19:10 so I’ll get back at it tomorrow.
47 replies
FFilament
Created by ehbfa on 9/7/2023 in #❓┊help
Open up a modal from a dashboard widget
Hi @wyChoong and @toeknee, I am the colleague of @ehbfa who is trying to get this working. I have literally been at this for several days and can not get anything working. I'm exhausted from wasting my time with ChatGPT too. I went down the path of setting up a Livewire component for the modal since the documentation links you provided are much too vague for a frontend developer such as myself. I am now currently tangled up in the weeds of Livewire & Alpine. Nothing is working and/or Livewire isn't recognized in the proper place, yada yada yada. Obviously I am super frustrated. Here is what I want to do: * After creating a Livewire component, I have a resources/views/livewire/themes-modal.blade.php file which contains a mix of html and javascript for displaying/generating content. * I want that to render in a modal when I click on a button in my resources/views/filament/widgets/themes.blade.php file, which is being displayed on our Dashboard Filament "page". Is this even possible? I think my "normal" approaches are conflicting with some deep-rooted Filament code?
47 replies
FFilament
Created by chrislcarr on 9/5/2023 in #❓┊help
How to trigger a modal?
The requirements changed (big surprise, right?), so I won't have Yes/No buttons any more.
9 replies
FFilament
Created by chrislcarr on 9/5/2023 in #❓┊help
How to trigger a modal?
That sounds good. The modal will show some information with several button links at the bottom that will allow the user to click on them. That will then display other information in the modal depending, of course, on what they clicked. All of that data will be coming from the "backend" endpoints provided by my colleague.
9 replies
FFilament
Created by chrislcarr on 9/5/2023 in #❓┊help
How to trigger a modal?
It seems like my best bet is to create a LiveWire component? Then in the LiveWire component view, I would create it within x-filament::modal tags? Will I then have all of the functionality of a Modal Action? I will be needing to have Yes/No buttons within it.
9 replies
FFilament
Created by chrislcarr on 9/5/2023 in #❓┊help
How to trigger a modal?
I am on a team with a backend PHP developer who has been working on the php files within app/Filament/... etc. I have successfully been building a theme to change the layout and styling of the Filament CMS. Right. I know that modals are Actions. I do not know how to "link up" the app/Filament files with the resources/views files. If I have a button/link in my blade file, how do I get a modal to display when I click on it? I realize that Filament is a backend CMS, but I am now trying to basically get an existing x-filament::page to show up in a modal when I click a link/button. I have not been able to find out how to do that.
9 replies
FFilament
Created by chrislcarr on 8/22/2023 in #❓┊help
How to add a CSS class to a v3 widget?
That does not work because apparently that is only for "Stats overview" widgets? https://filamentphp.com/docs/3.x/widgets/stats-overview#adding-extra-html-attributes-to-a-stat Please note that I am not a backend developer. I'm a frontend dev just trying to figure out how to add a class name to a widget with these breaking changes from v3.
8 replies
FFilament
Created by chrislcarr on 8/22/2023 in #❓┊help
How to add a CSS class to a v3 widget?
Thanks. Yes, can I still do it in the view in v3?
8 replies