Shinra
Shinra
FFilament
Created by olivier_oursblanc on 8/11/2023 in #❓┊help
Multi-select in relationship doesn't display values on edit
I always prefer assigning local_id and foreign id in the relationships
11 replies
FFilament
Created by olivier_oursblanc on 8/11/2023 in #❓┊help
Multi-select in relationship doesn't display values on edit
How about making sure the values saved in the table (from the relationship's save ) is a correct value ?
11 replies
FFilament
Created by olivier_oursblanc on 8/11/2023 in #❓┊help
Multi-select in relationship doesn't display values on edit
how about removing
->wherePivot('exclude', 0)->withPivot('exclude')
->wherePivot('exclude', 0)->withPivot('exclude')
from the relationship and put them in modifyQueryUsing ?
11 replies
FFilament
Created by JimKarvo on 8/13/2023 in #❓┊help
Relationship problems? (relationship with where)
idk if its bug or intended, need an insight from the dev
9 replies
FFilament
Created by JimKarvo on 8/13/2023 in #❓┊help
Relationship problems? (relationship with where)
hello, i also have the same requirement for where conditions on relationship this is my workaround, note the modifyQueryUsing
Forms\Components\Select::make('defect')
->label(__('Defect'))
->native(false)
->relationship(name:'defect_relationship',
titleAttribute: 'options_desc',
modifyQueryUsing: fn (Builder $query, string $context) => $query->defectOnly()->activeOnly($context == 'create'))
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->options_value} : {$record->options_desc}")
->searchable(['options_value', 'options_desc'])
->forceSearchCaseInsensitive()
Forms\Components\Select::make('defect')
->label(__('Defect'))
->native(false)
->relationship(name:'defect_relationship',
titleAttribute: 'options_desc',
modifyQueryUsing: fn (Builder $query, string $context) => $query->defectOnly()->activeOnly($context == 'create'))
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->options_value} : {$record->options_desc}")
->searchable(['options_value', 'options_desc'])
->forceSearchCaseInsensitive()
9 replies
FFilament
Created by Shinra on 8/13/2023 in #❓┊help
relationship question
for everyone facing the same issue, i am using the answer from this thread https://discord.com/channels/883083792112300104/1134461257764843561
4 replies
FFilament
Created by olivier_oursblanc on 8/11/2023 in #❓┊help
Multi-select in relationship doesn't display values on edit
use ->preload(), this will also show some options on the create page, consider using optionsLimit(10) or so if your select is searchable
11 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
as if it didnt reach the dd() at all
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
nothing happened
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
and the response is still 200, with these { "effects": { "html": null, "dirty": [] }, "serverMemo": { "checksum": "d01bfee9a651579cda0a6b6d919a641ed10be0f0da664f116ca9ddeaf07cfee5" } }
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
yes i just tried dd()
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
but nothing is in the log
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
hello, i have also tried that, like this DropInAction::make('password_action')->disableLabel() ->execute( function (\Closure $get, \Closure $set){ return \Filament\Forms\Components\Actions\Action::make('geolocate') ->icon('heroicon-o-search') ->label('Geocode') ->action(function () use ($get,$set){ Log::info('asdasdasd'); $set('subscriber_code', 'asdasd'); }); } )
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
i feel like i am so close with my approach to use drop-in-action as the submit button for my forms, any insights as to why the action button in my code is not working ?
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
so its not possible to make the submit button in the form schema ?
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
i had hoped that it didnt come to that.. hahaha, because i want to use the styling of filament's components
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
ah okay, i will complete my question first, the Action in my code would not call the update_password public function, and that confuses me
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
for a page with multiple forms, but still have 1 action ?
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
i mean, what is the use case
26 replies
FFilament
Created by Shinra on 6/20/2023 in #❓┊help
Page with multiple forms action
so.. what is the point of getForms() then ?
26 replies