Form With Data #
Form can be a bit tricky to collect data correctly, particularly weird thing is when you have a few submit buttons. The following form has:
- a text input
- a hidden input
- additional data in
ts-data
attribute - two submit buttons
When you click one of the buttons, you can observe that only that button was included in the data &emdash; which is what you need to decide which action to take.
Demo
Click a button to replace me with form data.