Sparclex/nova-import-card

Adding more than one instance doesn't work as expected

Closed this issue · 0 comments

I'm putting two of these on my dashboard page (e.g. one for users, one for product vendors) and when I do, picking a file for the second box puts it in the first, and picking a file for the first box puts it in the first.

A quick glance at the page's source suggests that the input's name HTML attribute is the same across all instances, there's a conflict going on there. Perhaps making a unique name for the field would work, such as name_product_vendor?

EDIT: Steps to reproduce:

  1. Add two instances of this card to the dashboard (or resource page)
  2. Click on "Choose File" on the second card and pick a file
  3. The file you picked appears in the first card, not the second.
  4. Expected behaviour: File you picked appears in the second card.