© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
zaidpirwani

Edit Related Record in Modal from an Infolist RepeatableEntry / View Page

Hello,
I am trying to edit a Quote record from the view page of an Order (Procurement Request) record

the order record has a repeatable entry which lists all the quotes in sections - every section head has an infolist action button

I want to open a modal to edit the related quote record - however, if there are any relation fields in the quote record form, filament is trying to find related relation with the Order (Procurement Request) record not the quote record.

use Filament\Infolists\Components\Actions\Action;


Action::make('editQuote')
    ->label('Edit Quote')
    ->form(Quote::getForm())
    ->action(function (Quote $record, array $data) {
        $record->update($data);
    }),

//FORM function the Quote Model - shortened
public static function getForm(): array
{
  return [
  Section::make('Quote Details')
    ->columns(2)
    ->schema([
      TextInput::make('vendor_reference')
        ->label('Quote Ref. No.')
        ->required(),
      Select::make('payment_term_id')
        ->relationship('paymentTerm', 'name')
        ->columnspan(2)
        ->required(),
      ]),
  ];
}
use Filament\Infolists\Components\Actions\Action;


Action::make('editQuote')
    ->label('Edit Quote')
    ->form(Quote::getForm())
    ->action(function (Quote $record, array $data) {
        $record->update($data);
    }),

//FORM function the Quote Model - shortened
public static function getForm(): array
{
  return [
  Section::make('Quote Details')
    ->columns(2)
    ->schema([
      TextInput::make('vendor_reference')
        ->label('Quote Ref. No.')
        ->required(),
      Select::make('payment_term_id')
        ->relationship('paymentTerm', 'name')
        ->columnspan(2)
        ->required(),
      ]),
  ];
}


Ideally I dont want to take user to another page
I can also mutate the data before calling the form - the above is part of the code

without the relationship field, the modal is opening
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Incorporating an infolist inside of an edit view modal?
FilamentFFilament / ❓┊help
2y ago
Infolist RepeatableEntry view entry action.
FilamentFFilament / ❓┊help
9mo ago
Modal infolist RepeatableEntry table is bugged?
FilamentFFilament / ❓┊help
2mo ago
Infolist RepeatableEntry with an Array
FilamentFFilament / ❓┊help
9mo ago