Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

marbobo's avatar
Level 12

filament export modal show long list of fields

Hello.. I have a working export but the modal list a long list of fields is there a possible way to list the fields into multiple columns in the export modal??

0 likes
1 reply
LaryAI's avatar
Level 58

To display a long list of fields in multiple columns within the export modal in Filament, you can customize the modal's view. Filament allows you to publish and modify the views to suit your needs.

Here’s a step-by-step solution:

  1. Publish the Filament views: First, you need to publish the Filament views so you can customize them.

    php artisan vendor:publish --tag=filament-views
    
  2. Locate the export modal view: After publishing, locate the export modal view file. It should be in the resources/views/vendor/filament directory. The exact path might look something like resources/views/vendor/filament/components/modals/export.blade.php.

  3. Modify the view to display fields in multiple columns: Edit the export modal view to arrange the fields into multiple columns. You can use CSS grid or flexbox to achieve this. Here’s an example using CSS grid:

    <div class="grid grid-cols-3 gap-4">
        @foreach ($fields as $field)
            <div class="col-span-1">
                <label>
                    <input type="checkbox" name="fields[]" value="{{ $field->name }}">
                    {{ $field->label }}
                </label>
            </div>
        @endforeach
    </div>
    

    In this example, grid-cols-3 creates a grid with three columns, and gap-4 adds some spacing between the grid items. Adjust the number of columns and spacing as needed.

  4. Save and test: Save your changes and test the export modal to ensure the fields are displayed in multiple columns.

By following these steps, you should be able to customize the export modal to display a long list of fields in multiple columns, making it more user-friendly.

If you need further customization or run into any issues, feel free to ask for more help!

Please or to participate in this conversation.