© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•4mo ago•
13 replies
BigBlueMonkey

Resource link for EditPage - force page rather than modal

I have a rather funky listrecords which effectively groups a lot of records into a single row/column. My DetailSummary extends EditRecord and the problem is that when I click the link, it opens a modal with a different (default) schema/form, rather than opening the custom page I have built. I noticed in this page Help with resource actions that you can define the schema - but I am unable to use Actions as I need to return html.

Here is what is really strange; If I remove the edit page from the getPages() in resources, the link loads SummaryForm schema in a modal. If I leave the edit page in tact, even though it isnt called, the detail link works perfectly fine and loads the page rather than a modal!?

public static function getPages(): array
    {
        return [
            'index' => ListSummaries::route('/'),
            //'create' => CreateSummary::route('/create'),
            //'edit' => EditSummary::route('/{record}/edit'),  #                  <-----
            'detail' => Pages\DetailSummary::route('detail/{record}'),
        ];
    }
public static function getPages(): array
    {
        return [
            'index' => ListSummaries::route('/'),
            //'create' => CreateSummary::route('/create'),
            //'edit' => EditSummary::route('/{record}/edit'),  #                  <-----
            'detail' => Pages\DetailSummary::route('detail/{record}'),
        ];
    }

DetailSummary:
class DetailSummary extends EditRecord
{
...
    public function form(Schema $schema): Schema
    {
        return DetailViewSchema::configure($schema);
    }
class DetailSummary extends EditRecord
{
...
    public function form(Schema $schema): Schema
    {
        return DetailViewSchema::configure($schema);
    }


ListRecords:
TextColumn::make('admins')
  ->label('admins')
  ->formatStateUsing(function ($state, $record) {
      $items = json_decode($state, true);

      return collect($items)->map(function ($item) use ($record) {
          $url = DetailSummary::getUrl([
              'record' => $item['id'],
          ]);


          return "<a href='{$url}'>
              {$item['adm']}
          </a>";
      })->implode(' ');
  })
  ->html(),
TextColumn::make('admins')
  ->label('admins')
  ->formatStateUsing(function ($state, $record) {
      $items = json_decode($state, true);

      return collect($items)->map(function ($item) use ($record) {
          $url = DetailSummary::getUrl([
              'record' => $item['id'],
          ]);


          return "<a href='{$url}'>
              {$item['adm']}
          </a>";
      })->implode(' ');
  })
  ->html(),
Solution
Yes. That's what I explained. You have a
form()
form()
on the resource and an
EditAction
EditAction
so Filament assumes you want to use that form. Opening a modal is a JS event while going to a page is a link. The JS event even fires when you click a link in that row.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Opening RelationManager in page rather than modal
FilamentFFilament / ❓┊help
3y ago
Allow Relation Manager to to link to the `view` page rather than open a modal
FilamentFFilament / ❓┊help
2y ago
How have EditPage works both as modal and a page
FilamentFFilament / ❓┊help
16mo ago
Custom Page: open modal from link
FilamentFFilament / ❓┊help
3y ago