SirFat
SirFat
FFilament
Created by SirFat on 4/9/2024 in #❓┊help
Form Design/Implementation Guidance Question
Hi, before I delve too far in experimentation, I'm curious as to whether anyone has an idea on approach. I want to create three HTML / Blade based panels which are clickable (and perhaps can be 'highlighted') that sets a variable accessible to the rest of the form and can behave in a live wire component/page. Use case: What type of cell service would you like?
[ IOT ] [ Data only ] [ Voice and Data ] <-- each of those panels are preferably driven from a blade When clicked, the clicked panel is clearly selected and sets a variable that subsequent parts of the form using ->hidden Closures can read and react to. Thoughts?
87 replies
FFilament
Created by SirFat on 3/16/2024 in #❓┊help
Password (and other fields) truncates themselves on screen (possibly due to live())
Hi, I'm after some guidance on how best to debug this. When entering a password (or some text inputs) the field appears to auto-truncate itself. I can see it performing an 'update' AJAX call at the same time it occurs. I thought it was just me, but people helping test have seen it as well (see https://internal-development.asmorphic.com/ (register). I have upgraded, cleared all caches, put it in production mode but I experience the same symptom. The password field is basically the vanilla register field with strength detection from the Laravel Daily team.
->live()
->password()
->label(__('filament-panels::pages/auth/register.form.password.label'))
->required()
->rule(Password::default())
->dehydrateStateUsing(fn ($state) => Hash::make($state))
->same('passwordConfirmation')
->revealable(filament()->arePasswordsRevealable())
->validationAttribute(__('filament-panels::pages/auth/register.form.password.validation_attribute'))
->afterStateUpdated(function ($state, Set $set) {
if (empty($state)) {
return;
}
$score = (new Zxcvbn())->passwordStrength($state)['score'];
$set('strengthScore', $score);
$this->dispatch('update-score', score: $score);
}
->live()
->password()
->label(__('filament-panels::pages/auth/register.form.password.label'))
->required()
->rule(Password::default())
->dehydrateStateUsing(fn ($state) => Hash::make($state))
->same('passwordConfirmation')
->revealable(filament()->arePasswordsRevealable())
->validationAttribute(__('filament-panels::pages/auth/register.form.password.validation_attribute'))
->afterStateUpdated(function ($state, Set $set) {
if (empty($state)) {
return;
}
$score = (new Zxcvbn())->passwordStrength($state)['score'];
$set('strengthScore', $score);
$this->dispatch('update-score', score: $score);
}
10 replies
FFilament
Created by SirFat on 12/31/2023 in #❓┊help
Actions within livewire component - only one firing
I'm displaying information on the dashboard, which calls a live wire component for each record (works). Within that livewire component, I show two actions. One action shows the 'confirmation' the other does not. No errors being generated, caches cleared, filament:upgrade run. The livewire class: https://gist.github.com/martinedge/740c1c09eaa94b0734cac2a02eb1b7ea The blade content:
<div>
<div class="items-center gap-x-3 gap-y-3 p-0.5" >
{{ ($this->setSIMNumberAction)(['phrase' => 'yes']) }}
</div>
<div class="items-center gap-x-3 gap-y-3 p-0.5">
{{ ($this->proceedWithActivationAction)(['phrase' => 'what']) }}
</div>
<x-filament-actions::modals/>
</div>
<div>
<div class="items-center gap-x-3 gap-y-3 p-0.5" >
{{ ($this->setSIMNumberAction)(['phrase' => 'yes']) }}
</div>
<div class="items-center gap-x-3 gap-y-3 p-0.5">
{{ ($this->proceedWithActivationAction)(['phrase' => 'what']) }}
</div>
<x-filament-actions::modals/>
</div>
Set SIM works, but proceed-with-activation does not. The action button spins, but then stops spinning without error or action. I'm sure it's something silly - but I cannot pick it as I've removed anything complex out of the picture.
3 replies
FFilament
Created by SirFat on 11/18/2023 in #❓┊help
Trigger action/s upon Wizard 'next'
Hi, I'm building a wizard which has multiple 'actions' on the step - and I want to be able to force trigger any outstanding actions when the user hits 'next' - as some users won't remember to perform each action to proceed. Is this possible?
3 replies
FFilament
Created by SirFat on 10/20/2023 in #❓┊help
validateOnly checks the rules, but requires a 'Submit' action to show the outcome.
Hiya! I'm trying to leverage validateOnly after a custom action which checks the validity of some data. I'm able to use ->rules([]) to define what these rules are, but I'm forced to hit 'submit' in order to have the validation messages populate. Is there another way to force the validation message to show up on demand?
10 replies
FFilament
Created by SirFat on 10/19/2023 in #❓┊help
Recommendation - Multiple Forms - Sorted Under Tabs
Hi, I'm putting together a system which has a metric tonne of reference tables that need to be managed. It will only get bigger out of time, and as such is impractical in a navigation. I'm at about 20 now. Rather than loading up the navigation as I have been so far, it would make more sense that they were grouped and each 'group' had a 'page' which could leverage 'tabs' to separate each, with their own simple index/create/edit/view functionality underneath. Any suggestions on how best to achieve this, given 'Section' appears to be layout within a form only, not outside a form? I could build the tabs manually in the blade, but if there is a better auto-managed way, that would be better. * Can a single form be held under a tab which is unrelated to the rest without hard coding? * Could I add tabs magically based on all the items within a 'grouping' property? (similar to navigationGroup). Happy to experiment with any ideas that come up 🙂
1 replies
FFilament
Created by SirFat on 10/10/2023 in #❓┊help
Rendering Custom Output in a Repeater Item
No description
108 replies
FFilament
Created by SirFat on 10/9/2023 in #❓┊help
Wizard Step 2 being skipped in Modal Dialog
Has anyone else experienced a situation where step 2 (and only step 2!) is always skipped in a Wizard, in a modal dialog? There is literally nothing special about the wizard. It also appears to ignore the cannot-skip flags and cannot click away flag. I can create a sample if required to reproduce, but again, there isn't much special about it. You can witness the behaviour via https://internal-development.asmorphic.com/
108 replies
FFilament
Created by SirFat on 10/5/2023 in #❓┊help
Custom Actions within a Repeater Schema
No description
5 replies
FFilament
Created by SirFat on 10/2/2023 in #❓┊help
filter table data based on external API
Hi, Wondering the best way to go about this. I will be contacting an external API to fetch plan information which will need to be displayed in a table. My understanding is filament does not support this. So thinking another way, I could synchronise the master data set in the background and instead use the result to filter the records, how would I go about this?
6 replies
FFilament
Created by SirFat on 9/29/2023 in #❓┊help
Referring to Stand-alone livewire component (form builder) via direct route
No description
7 replies
FFilament
Created by SirFat on 9/28/2023 in #❓┊help
Creating stand-alone livewire component using filament form
No description
4 replies
FFilament
Created by SirFat on 9/25/2023 in #❓┊help
Reusable Components (potentially with the ability to add many)
Hi, I'm trying to understand the best way to approach this - I want to create a generic contact 'contract' - which can be reused in amongst other forms. Use case: * A complex 'Person/Contact' creation module which manages addresses, phone numbers, name, birthdates each. * If multiple are permitted, the user should be able to 'some how' on the same screen elect which is 'primary' and which is 'billing'. * The 'Person/Contact' control would be used on a Livewire form to create orders, but the same 'Person/Contact' control would be available when looking at an account directly. Thanks!
4 replies
FFilament
Created by SirFat on 9/25/2023 in #❓┊help
Full-Size No-Navigation Livewire/Form - Available anonymously
No description
2 replies
FFilament
Created by SirFat on 9/4/2023 in #❓┊help
Support for non-tenant managed resources and pages in a multi-tenant implementation
Hiya! I've managed to get multi-tenant up and going, which is fantastic, where a tenant is required. I'm still stuck with the following How do I recreate a new filament-page which is not filtered by tenant? * I have a 'page' which is auto-loaded by the AdminPanelProvider. This by default works, when I click 'Register new client' - the URL building process must be different, as I receive
Missing required parameter for [Route: filament.admin.pages.helix] [URI: admin/{tenant}/helix] [Missing parameter: tenant].
Missing required parameter for [Route: filament.admin.pages.helix] [URI: admin/{tenant}/helix] [Missing parameter: tenant].
Even though on the navigation itself, I can see the tenant parameter being passed along. It is like the register page is trying to build the navigation for itself from a different relative perspective? The page (helix) in this case is just a page and is not bound to an Eloquent model, either. * I have an Eloquent model which is actually reference data. It is shared data (like country or email-address-type). The records are not intended to be filtered by tenant, nor will a tenant be managing the data (I will protect administration of this data via Laravel Pennant and permissions. I receive:
[App\Models\Country] does not have a relationship named [client]. You can change the relationship being used by passing it to the [ownershipRelationship] argument of the [tenant()] method in configuration
[App\Models\Country] does not have a relationship named [client]. You can change the relationship being used by passing it to the [ownershipRelationship] argument of the [tenant()] method in configuration
16 replies
FFilament
Created by SirFat on 9/2/2023 in #❓┊help
Filament-page + LiveWire Component
I'm trying to build a livewire component so I use that within a Filament page and I can only presume it's now by default loading in 'full-page' mode as it is only loading the component with no other assets. Is this something to do with the filament page or something to with livewire? I've followed a guide to perform this on filament 2 and livewire 2 and it works as the same symptom occurs on their example. Any idea where else to start or any guides on this I should be reading that I was unable to track down?
34 replies
FFilament
Created by SirFat on 8/24/2023 in #❓┊help
Route Parameters and Multi-Tenancy
Hiya! I'm attempting to put together Multi-Tenancy in Laravel10/Filament3 - I am following the guide on Filaments website, but I have a couple of roadblocks where this newbie is at a loss. Apologies if they are silly questions. I'm learning! * As instructed I created the register page in Pages/Tenancy/ - but as it appears far removed from 'Page' it doesn't support navigation discovery magic - so I've had to build a route manually into the page. * Now I have the AdminPanelProvider setting a tenant -pages which are auto-discovered don't have the 'tenant' parameter being passed through. "Missing required parameter for [Route: filament.admin.pages.verizon] [URI: admin/{tenant}/verizon] [Missing parameter: tenant]" * I bound the tenantProfile to the edit page in panel as described, but I then receive Route [filement.admin.tenant.profile] not defined.
12 replies