-1
Talk personal, all right? I have a little problem here that is taking my sleep. rs I can pass variables to the modal quietly as in the example below:
Button that switches the variable to the modal:
<button class="btn btn-primary btn-xs tooltips" data-placement="top" data-original-title="AlterarBoletos"
data-toggle="modal"
data-target="#alterarboletoscheckbox"
data-alt_ndoc="<?php echo $variavel ?>"
><i class="fas fa-magic"></i>
</button>
The problem ta when I need to pass information to the array:
<input type="checkbox" name="excluir[]" id="excluir[]" value="<?php $variavel ?>" />
<button class="btn btn-primary btn-xs tooltips" data-placement="top" data-original-title="Alterar Boletos"
data-ndoc_checks="<?php echo $this->input->post('excluir') ?>"
data-toggle="modal"
data-target="#alterarboletoscheckbox"
data-alt_ndoc="excluir[]"
><i class="fas fa-magic"></i>
</button>
JQUERY:
$('#alterarboletoscheckbox').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget) // Button that triggered the modal
var alt_ndoc = button.data('alt_ndoc') // Extract info from data-* attributes
var modal = $(this)
modal.find('#alt_ndoc').val(alt_ndoc)
})
My result is simply ' delete[] '. Someone give me a light? Thank you very much!