How to add a file uploader render in a dynamically added rows?

something like: enter image description here

But in dynamically added Like:

enter image description here

Let say before or after drop down and the input text field?



This does not fully answer my question but partially and puts it in the right direction:

I added now file uploader look like so: enter image description here

Now when I save serialised data looks like this:

  "_1565251449037_37": {
    "category_id": "5",
    "file_uploaded": {
      "name": "",
      "type": "",
      "tmp_name": "",
      "error": 4,
      "size": 0
  "_1565251729340_340": {
    "category_id": "7",
    "file_uploaded": {
      "name": "wed2b_regions_stores_v1.csv",
      "type": "text\/csv",
      "tmp_name": "\/private\/var\/tmp\/phpZwzFAH",
      "error": 0,
      "size": 10591

When it return to the page refreshed I am getting the error: enter image description here

I understand why the error is because the element is a file element button and it can't be set plus I think magento is expecting the "file_uploaded" to be string and is an object and not a string when perhaps value should be file_uploaded.name

Any help on this appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.