Building Custom Form in Filament Page
Hello everyone,
I’m seeking guidance on best practices for creating a custom form within a Filament page. The form is quite simple: it includes a single input field and a button that triggers a modal dialog. The primary goal is to fetch a price from an external API. This form is independent of any Filament resource (i.e., no CRUD operations are involved; it’s purely a search function).
Current Approach & Issues
• Since this is a standalone page within Filament, I assume that a Livewire component isn’t necessary.
• However, If the "Search" field is empty, I’m facing an issue where the required field validation does not trigger when the modal appears, and I click the confirmation button.
• The current approach works - I can dd() inside the SearchPriceAPI function - but I feel like this might not be the best implementation.
Step 1 - Create filament page:
php artisan make:filament-page SearchPrice
Step 2 - Build correspondent form:
Blade view file:
2 Replies
If it is independent from any filament resource then just don't use filament Forms, but only its blade components as a custom view