Feed Hidden Field via JQuery

3

How do I send a value to a Hidden field via Jquery?

I need to send an array position to it.

    
asked by anonymous 27.10.2017 / 18:02

1 answer

4

Just like any other field:

You can pick up the id:

$(function(){
    $('#id_campo').val(id_array);
});

By name:

$(function(){
    $("[name='nome_campo']").val(id_array);
});

Or by class:

$(function(){
    $(".classe_campo").val(id_array);
});
    
27.10.2017 / 18:04