F
Filamentβ€’2y ago
Ray.nl

Relation Manager canCreateAnother

i'd like to remove the 'save and create another' button from the modal in a relation manager and I'd like to change the label of the save button in a relation manager. I can't find how to do that. $canCreateAnother doesn't exists in the relation manager.
4 Replies
Dennis Koch
Dennis Kochβ€’2y ago
It's on the CreateAction
Ray.nl
Ray.nlOPβ€’2y ago
πŸ™ Thanks for your fast reply!! I now have to almost similar question, I have a select box with a create function :
Select::make('client_id')
->relationship('client', 'reference')
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->reference} - {$record->first_name} {$record->insertion} {$record->last_name}")
->searchable()
->preload()
->createOptionForm([
])
->createOptionModalHeading(__('clients.Gegevens nieuwe client'))
->required()
->visibleOn('create')
Select::make('client_id')
->relationship('client', 'reference')
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->reference} - {$record->first_name} {$record->insertion} {$record->last_name}")
->searchable()
->preload()
->createOptionForm([
])
->createOptionModalHeading(__('clients.Gegevens nieuwe client'))
->required()
->visibleOn('create')
how can I change the label on the save button ? (Sorry, but I can't find it)
Dan Harrin
Dan Harrinβ€’2y ago
createOptionAction(fn ($action) => $action->modalButtonLabel('Button'))
Ray.nl
Ray.nlOPβ€’2y ago
Hero!
Want results from more Discord servers?
Add your server