How to set #value to the form item from HTML data-*?
I solved this task with Drupal.behaviors in js-file

like that:

Drupal.behaviors.mymodule = {
    attach: function (context, settings) {
        var paint_id = new Number($('.paint-order').data('pid'));
        $(context).find("[name='mymodule_product_id']").val(paint_id);

    }
}