Am currently making a function to import template data to my ACF form so the users can save time. The import works but not for pdf/image fields, any solutions are appreciated. The ACF template and offer forms are basically the same.
The data from the templates are in JSON format in the option value.

<option value="{"template_name":"Venue Rabatt","venue_name":"Venue W\u00e4rdshus","evenemang":"festlokal","rent":"6700","rent_from":"08:00:00","rent_to":"18:00:00","price_drink":"350","price_drink_discount":"","price_food":"500","price_food_discount":"340","bild":110,"files":[{"pdf":111}]}">Venue Rabatt</option>
$('#importTemplate').on('change', function() {
let choice = this.value;
$.each(jQuery.parseJSON(choice), function(key,val){
// console.log("key : "+key+" ; value : "+val);
let el = $('#offerModal').find('div[data-name="'+key+'"]');
el.find('input').val(val);
});
});
acf_form([
'new_post' => [
'post_type' => 'offert',
'post_status' => 'publish'
],
'field_groups' => ['group_5ee337609a2a9'],
'submit_value' => __('Send offer', ''),
]);
ACF Fields/Groups