How to use two forms and submit once?

前端 未结 6 1165
广开言路
广开言路 2020-12-11 07:20

Is it possible to have two forms with two submit buttons such that when I click on the button it saves the input fields in both forms?

I\'m concerning to solve this

6条回答
  •  醉话见心
    2020-12-11 07:36

    A submit button submits only fields of the form it lives in. If you need content of both forms, you'll have to copy the fields from other form to some hidden field in the form where submit button was clicked. This can quite easily be done in JavaScript.

提交回复
热议问题