0
I’m trying to bring a value that when clicking a button brings in an input that works but the value does not appear inside the Value input so I can’t capture this value via PHP.
Follows the code
https://jsfiddle.net/felipefranco/2fkje6m4/3/
Knob
<a href="#my_modal" data-toggle="modal" data-fornecedor-id="<?php echo $rowPedido->id; ?>"><img src="img/lupa.png" ></a>
Input
<input type="text" name="idPedido" id="idPedido" value="" />
JS
$('#my_modal').on('show.bs.modal', function(e) {
var idPedido = $(e.relatedTarget).data('fornecedor-id');
document.getElementById('idPedido').value = idPedido;
});
Thanks Gustavo worked out that was right!!
– Shaolin Fantastic