Is it possible to install two buttons in the form and have them take different actions?
Below is Ravel's Blade.
For example, action method.a
and action method.b
on Finish when you teach Next.
<form method="post" action={{route('method.a')}}>
@csrf
<input type="hidden" name="id" value="{{$id}}">
<textarea type="textarea" class="textarea" id="item" name="itemList"></textarea>
<br of >
:<input type="text" id="sss" name="sss" value="">
:<input type="text" id="ppp" name="ppp" value="">
<button type="submit" class="button">Next</button>
<br of >
<button type="submit" class="button">Finish</button>
</div>
</form>
Wouldn't it be better to add the formatting attribute to the button tag?
I think the following pages will be helpful.
You can use formaction
to switch actions as already mentioned, and if the actions are the same, the server can receive (this will switch actions) which buttons are pressed like <button name="foo" value="bar">bar;<>>
.
By the way, please be aware of when submitting by pressing the enter key instead of clicking the button in both methods are used.Many browsers say that the first button that appears in the form is submitted, but that is probably not the behavior you intend, so if applicable, you need to take action to suppress the submit by the enter key.
361 Add dataframe values of the same structure without column names
355 Unity Virtual Stick Does Not Return to Center When You Release Your Finger
366 Is there any other way to save the Python database?
374 I want an event to happen when I click on a particular image on tkinter.
345 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2023 OneMinuteCode. All rights reserved.