jQuery(document).ready(function() {
    jQuery('#whatsappchat_settings_nb_buttons').on('change', function () {
        jQuery('input[name^="whatsappchat_settings_1[nb_buttons]"]').val(parseInt(this.value));
        /*jQuery('<input>').attr({
            type: 'hidden',
            id: 'whatsappchat_settings_1[nb_buttons]',
            name: 'whatsappchat_settings_1[nb_buttons]',
            value: this.value
        }).appendTo('form');*/
        jQuery("form")[0].submit.click();
    });
});
