Goodbye everyone and thanks for your interest, I have a problem and I try to create a form with 2 inputs and a select, each one sends a different data to the php driver,
<form method="post" action = "{$link->getModuleLink('krack', 'listadoMercancia')}">
<input name='op' value='add' type='hidden'>
<input name='up' value='del' type='hidden'>
<select name="select_tiendas" id="tiendas" class="form-control select_destino_envio">
{foreach $tiendas as $tienda}
<option value="{$tienda.id_store}" data-name="{$tienda.name}" select="selected"> {$tienda.name}</option>
{/foreach}
</select>
<div class="row boton_grabar_envio">
<button type="submit" class="button btn btn-default boton_borde" name="addBulto" id="boton_grabar_envio">
<span>
{l s='Grabar bulto'}
<i class="icon-chevron-right right"></i>
</span>
</button>
<button type="submit" class="button btn btn-default boton_borde" name="remBulto" id="boton_restar_envio">
<span>
{l s='Restar bulto'}
<i class="icon-chevron-right right"></i>
</span>
</button>
</div>
</form>
The idea would be that when you press the first button ("add") it calls you to the same method as the second one, but with the input with the add value, it adds to the database and with the "del" or "rem" has an if else, which decides whether to insert one or the other. My problem comes here, since it only lets me collect the last input and the id, I do not pick the one I select, however if I remove 1 input if it collects the correct data and value, how could I program it with the button? of "subtract" pick up the value of the input "from" and the selected value of the select?
I do not know if I've explained myself very well ...
Thank you very much in advance.
Greetings.