Download script not working in repeating group

wezetel

Active Member
I have a form to create a meeting agenda and to attach the documents needed for the various items of the meeting. As each meeting might have different numbers of documents I realized the document section with a repeating group consisting of a description of the meeting item (field) and the according document (fileupload element).
The frontend just shows the details view (no user interaction required) with an icon to download the meeting document. This works with the first item (dialog to open or save the document), but the second and all further elements results in an error: DOWNLOAD NO SUCH FILE
So I needed to disable the download script, but the disadvantage here is, that the documents (at least on most Windows machines) will open in the same window (no option to open in a new window) and the file name is shown (instead on having an icon).
Any clue how this can be solved?

Just for your information: this is the link to one (the first) meeting agenda I created (disabled the download script): http://starzach.de/index.php/rathaus/sitzungen/246-gemeinderatssitzung-29-september-2014

For completeness: this link works http://starzach.de/index.php?option...lement_id=225&formid=18&rowid=8&repeatcount=0
But as soon as the repeatcount is incremented I get the mentioned error
 
Hi,

In the ELEMENT, you can try to set the custom link settings to include the target and then set show in details to yes...
 

Attachments

  • link.png
    link.png
    63.4 KB · Views: 179
Thanks genyded to have a look at my problem, but I tried without success. The custom link is visible in the list (backend), but not in the details view (frontend). Seems the 'Custom Link in Details' switch has no effect.
 
Thank you Dale,

this solved my biggest issue, because now clicking the document link will open a new window and the user doesn't 'leave' the webpage.

I just added your JS code in the elements JS code section (code between brackets - no seperate file) and it works.
 
Just realized I need to change the JS Code a bit, because selecting elements with the TagName results in opening every link on the page in a new window (even menu links). So I choose to use:
var anchors = document.getElementsByClassName('download-archive');
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top