A
A
Andy Oker2021-03-21 21:34:34
Vue.js
Andy Oker, 2021-03-21 21:34:34

How to submit a feedback form on a button click outside the form tag?

There are 2 components. In the first form with fields to fill. And in the second, certain information and a button for submitting the form.
6057916e0d771175533126.png
How to connect this case?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ankhena, 2021-03-21
@Ashlis

<form id="data" action="handler.php">
   <p><input placeholder="Ваше имя" name="user"></p>
  </form>
  <p><button type="submit" form="data">Отправить форму</button></p>
 </body>
</html>

https://webref.ru/html/button/form

T
ThunderCat, 2021-03-21
@ThunderCat

It's not at all clear why not wrap both blocks in a form ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question