Share via


How to Create Custom Upload Forms for a Document Library

Question

Wednesday, January 17, 2018 3:45 AM

Hi,

I am rather new to SharePoint 2013.  I have a document library of different types of equipment containing folders by year.  Each folder by year stores multiple PDFs relating to that piece of equipment for the year (i.e Equipment folder named Elevators contains folders for the years 2016 and 2017 and each of those folders has multiple PDFs).  I have just figured out how to create a content type for the equipment and then a view showing the columns that I want filled in for a document.  For instance, for Elevators I have a column showing for displaying a document type of Inspection, Permit, Preventive, or Corrective.  I have another custom column created displaying the number of elevator.  These show correctly in the view when I click on the elevator folder for any building.  Now, I need to figure out how to have a custom upload document form.  When I am choosing to upload a document to the elevator folder, in addition to browsing for the file, I want the user to fill in the elevator document type and number of elevator at that time.  So a couple of questions 1. How do I create a custom form that will show the two columns to fill in and have it called when I click on Document Upload when I am in the Elevator folder?  2. Is there a way that this custom form can be modified to take additional parameters and save the file based on those?  I am having difficulty with people uploading documents that don't follow naming conventions.  So for instance, if my naming convention is yyyy-mm-dd [Vendor Name], can I have a date control on the form for the person to choose and then a pre-populated drop down of Vendor names.  The person chooses the date, vendor name, elevator document type, elevator number, and browses to the file.  Elevator document type and elevator number are populate in the view that is shown and the file that is uploaded is saved with the date they chose and the vendor name.  Any help here or code snippets would be much appreciated.  I have never used jquery before.  My background is in Visual Basic and SQL.

Thank you!

Thayana

ThayanaK

All replies (9)

Wednesday, January 17, 2018 4:18 PM

Hi Thayana- first, I highly advise you not to use folders in SharePoint due to the number of issues they cause, especially down the road.

That said, you can change what columns (fields) show in the forms by going into the library settings. Make sure allow management of content types is checked. Then under the content types section, choose the document CT and change which fields show in the form.

You can also set up validation on the field for your naming convention so that they must follow the format.

If you need to customize it further, you'll have to use a form tool like InfoPath or Nintex. Note that InfoPath is going away in the future.

cameron rautmann


Wednesday, January 17, 2018 6:55 PM

Hello Cameron,

Thank you for your response.  I have made sure my allow management of content types is selected.  All of my data is in the same document library, so are you saying that the document upload form can be by content type and show the fields that I need by content type?  (i.e a content type of elevators and a content type of fire suppression would show different columns so when uploading a document to an elevator content type I only want to see the columns for an elevator)

Thank you,

Thayana

ThayanaK


Wednesday, January 17, 2018 7:17 PM

No, for that you would need to customize the form.

cameron rautmann


Friday, January 19, 2018 2:37 AM

Hi,

I downloaded InfoPath.  Can anyone tell me the steps to create custom document upload or edit forms and then how can I call these in SharePoint based on the content type of the folder I am in?

Thanks,

Thayana

ThayanaK


Friday, January 19, 2018 12:57 PM

That's a lot to ask of us. You'll need to familiarize yourself with InfoPath, start building your form and then ask individual questions when you need help.

You won't be creating separate forms for each, rather you'll create 1 form and in that you'll create different views of it depending on what type the user chooses.

cameron rautmann


Friday, January 19, 2018 2:00 PM

So one form would have all of the columns that need to be filled in for every one of my content meta types (i.e. for elevators they need to fill in Elevator Number and Elevator Doc Type, for boilers they need to fill in a state ID, for cross connects a control ID)?  Then the view hides or shows what I need depending upon the content type.  Do I understand correctly?  Thanks.

ThayanaK


Friday, January 19, 2018 2:39 PM

Correct. Depending on how you want to put it together, you could have just one view and use sections for each set of fields. Then you can show or hide the sections based on rules.

cameron rautmann


Friday, January 19, 2018 2:44 PM

Ok.  I will give it a shot.  Do you know if it's possible for me to take the values that a user would choose in a date control and in a drop down and save the name of the file as that?  Thanks.

ThayanaK


Monday, June 17, 2019 1:54 PM

You certainly can do this  with content types - if there are any columns between the two that "overlap" be sure to define those columns in the content type from the same SITE COLUMN. 

All science is either physics or stamp collecting