F
Filament4mo ago
Apollo

Adding a form in a filament php infolist section in action headers help

Adding a form in a filament php infolist section in action headers repo : https://github.com/Zeinot/filament-don-sang-php/tree/main v3.2.92 so the issue is in the file path :
app/Livewire/ViewPost.php
app/Livewire/ViewPost.php
i'm trying to make a form modal when you click on a button in the header of an infolist this is the code example
public function productInfolist(Infolist $infolist): Infolist
{
return $infolist->record($this->post)->schema([
Section::make("View Post")
->headerActions([
Action::make('submitForm')
->form([
TextInput::make('exampleField')
->label('Example Field')
->required(),
])
// ^^^^^^ this doesnt works
->action(function (array $data) {
// Handle form submission here
// For example, save $data to a database
}),
Action::make("Book2")->url(fn(): string => route('booking', ['post_id' => $this->post_id]))
// ^^^^^^ this works
])
// .....
public function productInfolist(Infolist $infolist): Infolist
{
return $infolist->record($this->post)->schema([
Section::make("View Post")
->headerActions([
Action::make('submitForm')
->form([
TextInput::make('exampleField')
->label('Example Field')
->required(),
])
// ^^^^^^ this doesnt works
->action(function (array $data) {
// Handle form submission here
// For example, save $data to a database
}),
Action::make("Book2")->url(fn(): string => route('booking', ['post_id' => $this->post_id]))
// ^^^^^^ this works
])
// .....
there may be an issue with the admin panel before you need a google maps api key to access the route /center but the question i'm asking has nothing to do with the panel that lives in route /center, it has to do only with the route /posts/{post_id} ‼️ please ping me when answering ‼️
GitHub
GitHub - Zeinot/filament-don-sang-php
Contribute to Zeinot/filament-don-sang-php development by creating an account on GitHub.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server