Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentβ€’3y agoβ€’
37 replies
Husky110

Posting data from one page to another with a form

Hi - What I wanna do is post data from one custom page to another via POST-Request. Right now I face three issues:
1.) How does the Target-Page has to look like so it's route is only accessable through a post-request? I guess I have to modify the
getRoutes()
getRoutes()
-function to look like this:
return function () {
            Route::post(self::$slug, self::class)
                ->middleware(self::getMiddlewares())
                ->name($slug);
        };
return function () {
            Route::post(self::$slug, self::class)
                ->middleware(self::getMiddlewares())
                ->name($slug);
        };

Right?
2.) How do I access said post-data inside the target-page?
3.) How does my
submit()
submit()
-function has to look like? getState and such yes, but is it as simple as
return redirect(TargetPage::getUrl(['post-data' => $this->form->getState()]))
return redirect(TargetPage::getUrl(['post-data' => $this->form->getState()]))
?
Edit: Just to clarify - I do not want to do something with a model here. Basically I'm building a multi-step-process with some pages where one step's data is dependent on the last step's values (which is why I don't use Steps or Wizards).
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

Pre-fill or Transfer Data from One form to Another
FilamentFFilament / β“β”Šhelp
3y ago
Sending data from a custom page to another custom page
FilamentFFilament / β“β”Šhelp
8mo ago
two forms data from one resource to another...
FilamentFFilament / β“β”Šhelp
3y ago
Open modal with form from another form.
FilamentFFilament / β“β”Šhelp
3y ago