When updating an interface, I want to see the previous uploaded documents on "Create"

I Have a Form in wich I upload documents. It works well.

When using Update action, I need to see what documents have been uploaded, keeping the possibility to add more documents.

How to? 

  Discussion posts and replies are publicly visible

Parents
  • The default method (as you can already see here) is to show a File Upload Field and pass in the previously-uploaded document's ID (and preferably make the field read-only).

    I recommend against this method because the results are clunky and, IMHO, kinda amateurish.  The file upload field populates with the document's name but not much other useful information (other than perhaps the file size).  The user isn't able to preview or even download the existing document though, so they're stuck just seeing the filename and not much more.

    Instead I'd recommend setting up a Rich Text display field to show the document and, depending on what you want to accomplish, allow various other options.  The most common thing to do here is to show the document's name and turn it into a link tied to a Document Download Link, which upon clicking, allows the user to download the document.  Alternatively, depending on the file type, the user could be allowed to open the document in an a!imageField() (for picture type documents) or an a!documentViewerField() (for PDF files and Text files).  I usually make a separate link, tied to an icon (like a magnifying glass), that saves the affected Document ID into a local variable when clicked, and have the Preview field configured to open when the Document ID is non-null.

    With some trial and error, you can pretty easily set up something fairly functional and nice-looking, like this example:

Reply
  • The default method (as you can already see here) is to show a File Upload Field and pass in the previously-uploaded document's ID (and preferably make the field read-only).

    I recommend against this method because the results are clunky and, IMHO, kinda amateurish.  The file upload field populates with the document's name but not much other useful information (other than perhaps the file size).  The user isn't able to preview or even download the existing document though, so they're stuck just seeing the filename and not much more.

    Instead I'd recommend setting up a Rich Text display field to show the document and, depending on what you want to accomplish, allow various other options.  The most common thing to do here is to show the document's name and turn it into a link tied to a Document Download Link, which upon clicking, allows the user to download the document.  Alternatively, depending on the file type, the user could be allowed to open the document in an a!imageField() (for picture type documents) or an a!documentViewerField() (for PDF files and Text files).  I usually make a separate link, tied to an icon (like a magnifying glass), that saves the affected Document ID into a local variable when clicked, and have the Preview field configured to open when the Document ID is non-null.

    With some trial and error, you can pretty easily set up something fairly functional and nice-looking, like this example:

Children
No Data