Hi, I need to separate the names of the files loaded with the multifield method,
because I made sure that they are linkable and therefore downloadable.[file=11888]link_multifield.jpg[/file]
If you copy+paste your debug here, specifically the file upload parts, you'll be able to see exactly what you're after.
{data:file33} they are separated in the data array!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
table field name: file33 (unless you're going to do what you're told and rename the file33 field in your database to files and turn off auto manage database
value: {var.jsonen:upload15.[n].filename}
Where I told you. Add a data override to your save data action. Table field name will be "files" and the value will be {var.jsonen:upload15.[n].filename}
NO turn it off. It will add in all the fields from your design tab to your database structure.
And did you call your database field FILE or FILES ?
Ok. Now I try. Yes I have corrected file in files. Thank you.
Great. Now when you display it in CCv6 you have to decide how to do it.
Do you want to directly link to the file because you haven't thought about security and you don't care if anyone at all downloads all the files? Then just loop through {var.jsonde:ccv6tableviewname.row.model.files} and make a link like <a href="/components/com_chronoforms6/chronoforms/uploads/{var:loop.row}">My file</a>
Do you want to create a download event that your link points to because you thought about security and you've locked the folder down so random people can't download whatever they want from it? Then loop through {var.jsonde:ccv6tableviewname.row.model.files} and make links pointing to a download event with the ID of the tableview entry and the index of the file (from your loop's .key parameter) and then have the download event read the database entry again using the ID, get the right filename from files using the passed file index, and use that in a download action.
Excuse me but when you write "Then just loop" does it mean that in chronoconnectivity I have to use a loop action or just use a link action?
I'm trying to do what you suggested but it doesn't seem to work. Thank you healyhatman!
Well you have multiple links per entry right? To display the links you'll need a loop
You have a loop, but you've misspelled the data source, you haven't put the download view in the loop, and you haven't told the details view to use the loop.
I'll think about what you told me and I'll work on it tomorrow. One last suggestion but in the "Loop" action in "Loop body" I have to insert some other "shortcodes". Thanks
Again depends on how you're doing it. But either way it should be the link text you want. Use {var:loop.row} in the loop body to get the current filename
*sigh* yes something is missing. You need to use the loop to create a series of links. The last code you were given in my last post has the filename each loop, turn it into a link.
Sure looks good have you tried it? I'll leave you to it it's 1am
Thank you, good night.
If the only one who tries to give answers in the face of an apparently very powerful component but from a completely inadequate documentation.
Really a pity.
At some point you want to create many custom_codes and then you want to stop using chronoconnectivity
What you're trying to do is actually very easy but you just lack the understanding of basic concepts
The view needs to be called in the details view column setup. I could have this done in seconds if you paid me. $75AUD p/hr , 30 minute blocks minimum
OK This is the last time I'm going to help for free on this issue because I've spent hours. Here we go, start to finish, pay attention.
1) Create an Event called download
2) Create a download function called download_file
---- a) File directory path: {path:root}/pathtoyourfolder/{data:file} (replace pathtoyourfile to whatever you need to to give a path to your upload folder)
3) Create a Link element called download_link
---- a) Event: download
---- b) Content: {var:file}
---- c) URL and/or URL parameters: file={var:file}
4) Create a Loop function called files_links_loop
---- a) Data provider: {var.jsonde:details_view_name.row.model.files} (if this bit doesn't work, try removing the model)
---- b) Loop body: {view:download_link$file=(var:files_links_loop.row)}<br>
5) In your details view, under fields views, put model.files:{fn:files_links_loop}
Do all that and it will work. If it doesn't work, you've done it wrong.
Everything worked perfectly. You have been precise and detailed.
I really appreciated what you did and I think that other forum users have appreciated it.
This enhances the time you invest and today those who want to donate to healyhatman will have an extra reason to do so.
I believe that if there was a little more documentation this component could become as widespread and appreciated as Chronoforms.
Thank you.