Can I use only the input form for multiple forms?

Can I use 1 input field for several for several forms, this is my idea, but I do not know how to do it.

<form id="form1" method="post">
    <input type="text" form="form1 form2" />
    <input type="submit" value="submit" />
</form>

<form id="form2" method="post">
    <input type="submit" value="submit" />
</form>

Sorry for my bad english.

+4
source share
1 answer

This is possible with PHP for each loop. Place the form around your foreach loop, but the submit button is outside your foreach loop and inside your form. You need to assign an input value from an array.

0
source

Source: https://habr.com/ru/post/1691167/


All Articles