How to use two forms and submit once?

前端 未结 6 1155
广开言路
广开言路 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:22

    Nope, you can only submit one form at a time.

    If you have to use two forms, the only way to do this would be to clone the second form's fields into the first one using jQuery. Won't work when JS is turned off, though.

    See Copying from form to form in jQuery

    Why do you need two forms?

提交回复
热议问题