Multiple forms in custom page
I have two forms. But when pressing submit both forms get's triggered.
32 Replies
The blade file
Anyone?
You should use a
<button type="submit">
instead of the actions.tried that. same result
So you removed the actions? Can you try to use a
<form>
instead of <x-filament-panels::form>
? Also check your HTML source code for nested forms.form the form seeing them seperate
making blade like so doesn't change anything
of course using button like this doesn't have styling
Is
wire:submit.prevent
default now in LW v3?
Because it's still present at the bottom but not in your code.yes it is
Okay.
I have no idea then, sorry.
I guess then I need to make an issue with the demo repo
Yes. Best to use a fresh install and a minimal form setup to compare whether it's really an issue,
weird. The html should have
<form wire:submit="updateProfile">
...it has at the end
nope.. if you have
<form wire:submit="updateProfile">
it should render exactly thisif you mean without alpine directives then it is just like if I don't use blade component for the form
yes, because you did
right?
what is the result when you submit?
the same as with using components
ok but you have two methods. What is the result if you do this?
dumps as expected
both forms get's triggered in the same time?
I didn't understand when you said: But when pressing submit both forms get's triggered.
for password form i have validation like current password, same for password confirmation
it i enter anything in password inputs and press submit for this form it should show validation errors
but instead it submits the first form
also i can see that both submit buttons are triggered of changing colors
if you want here's demo repo https://github.com/krekas/filament-multiple-forms-test
remove try catch
OK will try
TextInput::make('current_password')
instead of TextInput::make('Current password')
...I would assume that with try it should work because in filament it's how it's done
Solution
remove
catch (Exception $e)
if you want to keep try catchWill try when I get back home. Thanks for now
let me know because there is an issue opened..
Will close it if it will work
yes but it generates work to Dan and Team
Will try it today