josef
josef
FFilament
Created by josef on 10/14/2023 in #❓┊help
Disabled relationship field is added to inserted valued on create
I have a form with multiple relationship fields that is by default disabled on create. When saving, I get a 500 error, because the query to create the model record includes the relationship field (obviously without a valid value), but that field does not exist in the database as it is a relationship. Anyone ever encounter this or know how to fix?
3 replies
FFilament
Created by josef on 8/16/2023 in #❓┊help
Force refresh on page actions
I have an action on the edit page that changes some data on the model, and after that I want to conditionally hide that action and show another one (think publish/unpublish), but even though the form itself seems to refresh, the actions don't. Is there an event I could dispatch to force that?
10 replies
FFilament
Created by josef on 8/16/2023 in #❓┊help
Toggle in Action does not respect default state
8 replies
FFilament
Created by josef on 7/20/2023 in #❓┊help
Open a modal from checkbox label
2 replies
FFilament
Created by josef on 6/17/2023 in #❓┊help
Align TextInput and Toggle in Grid
3 replies
FFilament
Created by josef on 4/24/2023 in #❓┊help
Table on resource edit page?
I want to show related records on a resource's edit page/form, without a possibility to edit them. Can I disable editing and deleting for the relation manager, or is there a way to add a table to the form page? Widget?
4 replies
FFilament
Created by josef on 4/17/2023 in #❓┊help
Filtering by clicking on column
I'm trying to set a table filter by clicking on the corresponding value in a table column using action() (as extraAttributes() gets escaped by blade). Using the following code
Tables\Columns\TextColumn::make('column.name')
->searchable()
->alignEnd()
->description(__('Some Description'), 'above')
->action(function (Model $record) {
$this->tableFilters['filterName'] = $record->value;
}),
Tables\Columns\TextColumn::make('column.name')
->searchable()
->alignEnd()
->description(__('Some Description'), 'above')
->action(function (Model $record) {
$this->tableFilters['filterName'] = $record->value;
}),
has no effect. The column (including the description, unfortunately) is clickable, and a request gets sent, but nothing else happens. Am I missing something? Do I have to tell the component to re-render? Setting a filter in html using wire:click="$set('tableFilters.filterName', [ '{{ $value }}' ])" does work fine, but is not achievable currently without overwriting the column templates and adding custom code.
6 replies
FFilament
Created by josef on 4/4/2023 in #❓┊help
Default value for select
I want to have the default value for a select not only pre-selected in the frontend, but also when saving. Currently, the validation throws an error that a value has to be chosen, even though the select (with placeholder disabled) shows the value that should be default. An example:
Forms\Components\Select::make('curency')
->required()
->options([
'EUR' => '€',
'USD' => '$',
])
->default('EUR')
->disablePlaceholderSelection(),
Forms\Components\Select::make('curency')
->required()
->options([
'EUR' => '€',
'USD' => '$',
])
->default('EUR')
->disablePlaceholderSelection(),
11 replies