>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:
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.
- 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.
- In the OSDownloads Pro control panel, click Download Fields.
- You will be taken to the OSDownloads Pro: Fields administrative page.
- Click New.
- Enter "First Name" as your custom field title into the Title field.
- Select data type from the Type field.
- Click Save & New.
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:
- 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.
- In the OSDownloads Pro control panel, click Options.
- You will be taken to the OSDownloads configuration page. Click Permissions.
- Make sure your permissions get displayed under the Public tab.
- Scroll down the page and set the Edit Custom Field Value to Allowed.
- Click Save & Close.
- 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.
The following options are available:
- To view their data, hover over the "User Data" column:
- You can also copy the data to your computer's clipboard:
- You can also export the data to a CSV file: