Being only the need to submit the form, you could use ajax, but it does not seem to me the case, yet there is a new Html5 attribute that can help you, is the form="..."
and create a hidden form (so you won’t need javascript):
<!--// formulário oculto -->
<form action="rota" method="POST" id="meuformulario">
<input type="hidden" name="chave1" value="1">
<input type="hidden" name="chave2" value="2">
<input type="hidden" name="chave3" value="3">
</form>
...
<p>....</p>
...
<button type="submit" form="meuformulario" value="Chamar">Chamar (trigger)</button>
Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
In addition it is still possible to control the form with other attributes by <button>
:
formaction
exchange form action pointed by attribute form=""
formenctype
this attribute changes the ecntype
form pointed by the attribute form=""
, values that can be used:
application/x-www-form-urlencoded
multipart/form-data
text/plain
formmethod
exchange the method of <form>
pointed by the attribute form=""
formnovalidate
exchange the value of <form novalidate="">
pointed by the attribute form=""
is a Boleano value.
formtarget
exchange the target
of the window instance you want the request to be made, examples of values accepted:
_self
_blank
_parent
_top
Example:
<button formaction="/pagina" formenctype="multipart/form-data" formmethod="POST" formtarget="_blank">