How to modify "Create Another" action in Filament to include a query parameter based on a form field

Question:

I'm using FilamentPHP and I want to enhance the "Create Another" behavior when creating a resource (e.g., Product). Specifically, I'd like to redirect to the create page again, but with a query parameter (e.g., ?store_id=123) taken from the currently submitted form field (store_id).

My goal is to make it easier for users who are adding multiple products to the same store consecutively.

How can I modify the "Create Another" functionality in a custom CreateRecord page (like CreateProduct) to append this query parameter after saving?

Any best practices or recommended approach?

Use Case Example:


  • User selects a store (store_id = 5) while creating a product.
  • After saving and clicking "Create Another", the user is redirected to /admin/products/create?store_id=5, so the store_id field is pre-filled for the next product.
Thanks in advance!
Was this page helpful?