| | |
| | | el.dataset.itemId = data.id; |
| | | |
| | | if (refs.select) { |
| | | window.prefixInput(refs.select, `${data.id}-`); |
| | | let wrapper = refs.select.closest('.preview'); |
| | | window.prefixInput(refs.select, `${data.id}-`, wrapper); |
| | | } |
| | | if (refs.video) refs.video.remove(); |
| | | if (refs.file) refs.file.remove(); |
| | |
| | | if (!p.isEmptyValue(value)) { |
| | | p.populateField(field, name, value); |
| | | } |
| | | const input = field.querySelector('input:not([type="file"]), textarea'); |
| | | const input = field.querySelector('input:not([type="file"])'); |
| | | if (!input) continue; |
| | | window.prefixInput(input, `[${data.id}]`); |
| | | window.prefixInput(input, `[${data.id}]`, field); |
| | | } |
| | | |
| | | } |