I have a collection with a record for a file (FWIW this is a bibliography. For very old books that are out of copyright, I may have a PDF that I want my users to be able to view). I cannot find a way to show that there is a file to look at on a repeater. If I create a PDF field, it is a static link, and not one that changes for each repeated block.
I suspect this cannot be done (in which case what is the point of allowing the field type?). But if it can be done, please tell me how.
Remember, a repeater just shows all the data which is stored in your database!
So if you would have all your links to your downloads in your database, the repeater would also show all this URLs.
In other words ----> You have to give a button in the repeater the right download-link for every repeated item.
Example:
-
you have 10-items in your DATABASE.
-
the repeater also shows 10-item (that means, that there are also 10-buttons in your repeater
-
each of these buttons should have his own download-link.
Not sure, but what if you just would connect your repeated-button with the column in your DATABASE called —> “DOWNLOAD-LINKs”, or something like that?
Just theoretical thougts!
I tried something like that. I put the URLs in another field, and displayed the URLs in the repeater, but it just treated it as a lump of text, not a clickable URL. I tried to wrap it in an HTML tag, but that failed, too. And the embeded HTML thingy does not seem to be allowed on a repeater block.
You can use the tag inside of a Text component to displayt clickable links .
Thank you. That looks like it will be a great page for me!
Am I right in thinking that I cannot create a link on a repeater to a PDF stored in the collection in a file column?
Can you predict what the file name is going to be of a file stored in your site file storage area? The links that I have seen thus far look like hierogliphics! I suspect that means that I may have to store the files elsewhere in order to get names friendly enough to store in those text fields.
Is there a context for your answer that I am missing? I had tried to include tags before, but failed. But I tried again after your comment, and still failed. I even used exactly the same example ( Stunning) as in the documentation, and all it did was print it as if it was just a piece of text.
For my context: I am trying to populate a field on a repeater, from a field in a collection, to crate a link to PDF of a document.
Are you saying you have tried adding a button to the repeater, you connected it to a document field but it is not connected dynamically?
Without a screenshot of your setup, I am assuming you have attempted to connect a button using the link icon instead of the dynamic connection icon.
See screenshot below for proper way of connecting buttons for dynamic content (such as Repeaters, dynamic pages, etc).
Each time a person clicks on the button they will be redirected to the Wix URL where your document is being hosted. (These URL’s cannot be edited and cannot be secured in a way such as Dropbox or Google Drive can by adding permissions.)
You could enhance the repeater a bit more by adding some code to hide / show the button when the document field is blank.
Or if you are not uploading the file in the database collection, you can connect the button to a URL field instead (in case you have the document hosted somewhere else, such as Dropbox, Google Drive, etc).
Not really. I have a repeater, and have connected it to a field in a collection that includes the HTML, either as the only content in the field, or in addition to other content. And when I run the page, as I said above, the text of the field, including the HTML is rendered as just plain text, not as HTML. It is working ‘properly’ as a repeater, in the sense that it renders the text for multiple items from the collection, but in all cases it just shows the HTML as text.
In your picture, what did you do to get it to allow you to select a File field? As per the original question, when I have tried to wire up a repeater, I have never seen a file field enabled (my first attempt at this was storing the PDF in the collection). This is probably more for information than usage, as I suspect we will end up with the files elsewhere (such as google docs) so we don’t blow the Wix size limit and have to upgrade to a more expensive package.
@richard28494 Do you by chance, have your Notes Field as a text field or a rich text field?
Rich text field will allow you to format, hyperlink, etc. (It has limited formatting tools …but it’s something I suppose.)
The only compatible elements for file / URL fields are images, icons or buttons. When you connect repeater elements it will only display the compatible fields based on the element you are trying to connect.
You could also add a button with transparent background. Buttons have 2 connections. The first is the label: you can leave a static label or connect the label value to a field in your database. For example: Link to Doc vs This Is The Title of The Doc
The second is the file / URL setting where you can select a document field or a URL field.
@code-queen Just a text field. I did not know that a Rich Text field was required (and the document Yisrael linked to, above, says nothing about that. Sigh.) Obviously I can change that easily enough. If the supported HTML elements in that document are accurate, it fails to achieve what I could do with, which is inline formatting for citations. Yes, I learned HTML back in the days before CSS, and have not really touched it since, so I still think in terms of or tags, not CSS.
OK, I changed the field to Rich Text, and no change. It still does not work. As you can see from the picture, the formatting has changed, and I have not yet managed to translate the documentation on how to format a rich text field into English. Oddly, records for books where I have not tried to put HTML in the notes field are in a much smaller font. I have no idea why, though it does suggest that it is at least understanding that something is different for the records with HTML tags. You will see in the second book that it is not just anchor tags it is ignoring, but things like
and
, which are definitelty in the list of tags it is supposed to support, based on the document Yisrael pointed me at ( is not supposed to work, unfortunately). So, really, I am no wiser. I will experiment with buttons, but do not want one when there is no PDF to link to, of course.
Scratch that: I now have it working. I had not noticed that with a RTF if you double click on a field, a formatting dialogue pops up. In that you can do things like the italics that I want for citations, and you can add a link to a PDF. Which really, really works. It is, perhaps, not what I would want where I would want it: it means that if we ever reload data we have to redo all the formatting, as we cannot import it. At the moment I have been reloading fairly frequently as designs changed as I understood more. But I hope that in the long term that will not be an issue. I still have to understand why the notes field for all other books is in the micro font: if it is ‘just’ because they have not been edited online (rather than just imported) that will be another major annoyance as I will presumably have to edit the notes, even if just to replace a full stop with another full stop (tried that - it works. Only another 300 books to do manually …). I assume that somewhere I can set the default formatting for a particular RTF field? Where?
This is so helpful. I’ve been trying to do this since I had to move from the List function Wix was no longer supporting. Was starting to do it manually too. Thank you!!
Is it possible to do something similar with the multi-document field in a collection? I have multiple documents per item and I’d like to list them on a dynamic item page.
You can use this app to display PDF dynamically from Wix CMS: PDF: View with 3D Flip Effects | Wix App Market | Wix.com
How to use the widget’s API: Working on Velo with PDF: View with 3D Flip Effects app | Certified Code Help Center