JSFiddle - React, Tailwind, and code Playground
HTML
<form method="POST" action="page.html" name="foobar" id="test">
<input type="text" />
<input type="submit" />
</form>
<a href="#" onclick="document.getElementById('test').submit();">click me</a>
JavaScript
document.getElementById('test').onsubmit = function() {
alert('foobar');
return false;
}