Open vinhpt2 opened 2 weeks ago
The following setup works for me. Hope this one can helps you.
let form = new w2form({
name: 'testForm',
fields: [
{ field: 'name', type: 'text', html: { label: 'Name' } },
{ field: 'inputFile', type: 'file', html: { label: 'Upload File' } }
]
});
let data = {
name: 'Test Name',
inputFile: [
{
'name': 'test.jpg',
'type': 'image/jpeg',
'content': {btob data},
'size': 19303
}
]
};
form.record = data;
I worder how to set value for w2field with type="file" in a w2form. If I set a string or null or "" the w2field go to malfunction - can not interact any more. (.w2ui-field-helper.w2ui-list have width=0px)