Blackpig
Disable entire form - throws error when checking $operation
I want to disable my
I don't want to do it on a field by field basis as this is a fairly large and complex form (also why I don't want a view). Snippet from my resource: But this throws
edit
form when certain criteria are met.I don't want to do it on a field by field basis as this is a fairly large and complex form (also why I don't want a view). Snippet from my resource: But this throws
An attempt was made to evaluate a closure for [Filament\Forms\Form], but [$operation] was unresolvable.
https://flareapp.io/share/17DXjr67
I thought the $operation helper was globally available
Small caveat - I've rushed my dog to the vets 3 times in the last 7 days so I'm a bit emotionally frazzled - I'm sure the answer is blindingly obvious
nbl6 replies
Custom layout - setting data from $get throws fatal Typed property initialization error
Flare error is here https://flareapp.io/share/LPd8ElvP
I am creating a quote worksheet with a Custom layout component:
and i'm trying to pass into the
->viewData
method calculated values from other fields on the form
Thanks for any light that can shed on this4 replies
Add an option to Checkboxlist via an Action
I'm trying to recreate similar behaviour to the
->createOptionForm()
of the Form\Select component https://filamentphp.com/docs/3.x/forms/fields/select#creating-a-new-option-in-a-modal but on a CheckboxList.
I was hoping I could utilise either the ->helpertext()
or ->hint()
methods and trigger an Action.
It renders ok - but the Action doesn't trigger the modal/form - is this possible or do I need top change my approach?
6 replies
CheckBoxList, Enums and TextColumn display conundrum
Salut
Interesting little problem. I have a Checkbox list on the form that is populated with an Enum. This all fine and works as expected - the labels are displayed and the values are stored correctly:
On the table I want to display the the selected values
Which is where the problem arises - the column displays the stored value and not the label.
Because this is a multi-value field , stored as JSON in the model I need to cast it to
type => 'array'
If this were a simple/single value field (e.g CheckBox or Select) then I could cast it to the enum type => OrganisationTypes::class
and the correct label would be displayed in the table column.
So how do I cast the field to an array and still have the Enum return the correct labels in the table column?
Thanks for reading this far!
My enum for reference
8 replies
Reactive ->live() not updating ->helperText and/or ->label() values
Title says it all - my code below, am I missing something blindingly obvious? I'd expect the title and helper text to update on the
title
field when the type
field changes.
19 replies
Nested Relation Managers - use create page not modal
Salut. I need to build a fairly complex structure which will involve nested RMs. Can I override the 'New <record>' action on the nested RM table to open in a new create/edit page rather than in a modal - so that the nested RMs will show the related records table?
Rough idea of relationship structure:
Top Level Model -> hasMany 2nd level model -> hasMany 3rd Level Model *-> could haveMany 4th Level Model
I'm converting an existing/legacy app - so I'm pretty restricted with the data structure
TIA
8 replies
Spatie Translatable Plugin - Repeater Fields Supported
Does the official plugin https://filamentphp.com/plugins/filament-spatie-translatable now support translation of repeater fields (stored as json).
Iirc in v2 it didn't support repeater fields so hoping v3 does
Iirc in v2 it didn't support repeater fields so hoping v3 does
11 replies
Plugin v2 -> v3 upgrade - custom view page not showing header actions
My header actions are not displaying on the page. According to the docs should be auto-magic https://filamentphp.com/docs/3.x/panels/pages#adding-actions-to-pages
Working my way up the inheritance the
vendor/filament/filament/src/Pages/Page.php
has the Concerns\InteractsWithHeaderActions;
and the method is being called as I can output the returning array to ray.
Am I extending the correct layout/template <x-filament-panels::page>
or any thoughts as to why my actions are not displaying as expected?
TIA7 replies
V2 -> V3 Plugin - custom view not picking up styling
In v2 my custom view rendered fine - picking up the TW classes
In v3 it's not rendering correctly. It appears that it's not picking up any additional TW classes.
The blade is now extending
<x-filament-panels::page>
instead of <x-filament::page>
Not sure what I'm missing to get the additional TW classes pulled in
The view
4 replies
Pass value from Modal form to Action on list page
I have a form modal on a list page triggered from a header action (not a table row action). How do I grab that value in the 'ListRecords' components action?
$this>pdfLanguage
is empty in the action call
TIA2 replies