Add a file-download widget on a form
Question
I have a file field called "contracts" between my user fields.
What I want is that in the user-profile form this field would come up as a file-download widget.
Does anyone have an idea how to show a file-download widget (even a link to a file would work) in the user-profile form?
Solution
Assuming that Your Drupal 7 site is a new site (not upgraded from a D6 installation), I think the best approach is to use the Profile 2 module (dependent on Entity API) and add a file field to the user profile.
OTHER TIPS
Drupal 7 includes a file field, and you can add a file field to the user profiles in admin/config/people/accounts/fields.
In the row "Add new field," you select "File" as "Type of data to store;" the form element to show is automatically set to "File," as that is the only form field you can use, in this case. When you click on save, Drupal will allow you to set the settings for the field.
To be able to select the file field, you need to first enable the File module in admin/modules.
Once a file is uploaded, the field will appear as in the following screenshot, in the user profile. (I have used "File" as field label.)
The name of the file downloaded is a link that can be clicked.
The file field has also the option to show the content of the uploaded file, instead of the link to the file.