How to Use Custom Fields to Collect User Information With OSDownloads

>In this guide, you will learn how to customize OSDownloads to ask for a user’s first and second name and email address when they download a file.

Custom Fields is a feature that was added to the Joomla core in version 3.7. We added it to OSDownloads Pro in version 1.12.0.

By default, the OSDownloads download form will only collect an email address and a checkbox to agree to Terms & Conditions:

download form without custom fields

In this tutorial, we'll show you how to add more fields to that download form. You'll see how to add First Name and Second Name fields, as in the image below.

form to arrive to

  • In your Joomla control panel, go to Components > OSDownloads Pro > Files.
  • Create the file you wish to offer in exchange for user data. If you are a beginner to OSDownloads Pro and don't know how to create a file for downloads, please see our Getting Started with OSDownloads guide. 

IMPORTANT: Make sure you set the Require Email setting in the Requirements to Download tab to Yes. Otherwise, your download fields won't get displayed.

require email

  • In the OSDownloads Pro control panel, click Download Fields.

download fields

  • You will be taken to the OSDownloads Pro: Fields administrative page.
  • Click New.

click new

  1. Enter "First Name" as your custom field title into the Title field.
  2. Select data type from the Type field.
  3. Click Save & New.

new field

Pro tip: please keep in mind that by default a new field will be assigned to ALL your file categories. Leave it as is, if it is OK with you. Otherwise, use the Category field to assign your new custom field to specific categories only:

01 default category filtering set to all

  • Repeat these steps to create the Second Name field.
  • You should now see both of the newly created custom fields listed in your Download Fields page.

two custom fields listed

  • In the OSDownloads Pro control panel, click Options.

options

  • You will be taken to the OSDownloads configuration page. Click Permissions.

click permissions

  1. Make sure your permissions get displayed under the Public tab.
  2. Scroll down the page and set the Edit Custom Field Value to Allowed.
  3. Click Save & Close.

set edit custom field value to allowed

  • Now visit the file download page on your site's frontend.
  • Click the Download button.
  • You should see both custom fields now nicely displayed and ready to collect data from your visitors. 

How to Administer Data Submitted by Users

Once a user has submitted some data using the Custom Downloads Fields, you can administer their data at OSDownloads Pro > Emails. 

emails user data

The following options are available:

  • To view their data, hover over the "User Data" column:

view data

  • You can also copy the data to your computer's clipboard:

copy data to clipboard

  • You can also export the data to a CSV file:

export to csv