Adding custom fields to your affiliate forms

In certain situations you may need to ask potential affiliates for certain details when they register for your program. Or you may find that you need to add custom private data for affiliates that only administrators have access to.

If this is you, then you’ll find this tutorial helpful. It will guide you through setting up custom affiliate fields, that you can add to the affiliate registration form, to the affiliate account settings form or just to the affiliate forms found in your WordPress admin dashboard.

Quick note: Affiliate fields are powered by our premium Custom Affiliate Fields add-on, which is available with all of our licenses.

If you already have a SliceWP license, you can download the add-on straight away from your account.

If you don’t have a SliceWP license, you can get one here.

Available field types

Before we start adding new fields to your affiliate forms, let’s firstly check out the different field types you have at your disposal. There are 16 different field types arranged into 3 different groups, as follow:

1. Predefined fields: these fields are used by the core plugin to handle predefined functionality.

  • Username: this field is used to set the affiliate user’s username when creating their account.
  • Email Address: this field is used to set the affiliate user’s email address when creating their account.
  • First Name: this field is used to set the affiliate user’s first name when creating their account.
  • Last Name: this field is used to set the affiliate user’s last name when creating their account.
  • Password: this field is used to set the password for the affiliate’s account.
  • Password Confirmation: with this field you can ask users to reenter their password to make sure they typed their password correctly in the Password field.
  • Payment Email: this field is used to set the affiliate’s general payment email. The email address introduced through this field is primarily used to send payments, for example through PayPal.
  • Website: this field is used to set the address of the website where the affiliate promotes your business.

2. Standard Fields: these fields are highly customizable. You can use them to gather a wide variety of information.

  • Single Line Text: this is a simple text input field, mainly used for short strings.
  • Textarea: this is a multiline text field used for long strings.
  • Select Drop-down: as the name suggests, this field is a drop-down style select box with multiple customizable options, where the user selects just a single option.
  • Checkboxes: with this field you can add multiple choices, in the form of checkboxes, where the user can check a single option or multiple ones.
  • Radio Buttons: similar to Checkboxes, with this field you can display multiple choices, however the user can check only one option.
  • Heading: this is more a presentational tool, than an actual field. With it you can add custom headings. You can use these to break the forms into more manageable sections, which improves your forms’ experience.

3. Location Fields: these fields have predefined values, however they offer some customizability.

  • Country – this field is a select drop-down that comes pre-populated with the names of all countries.
  • State – similar to the Country field, this field is a drop-down that’s pre-populated with the states corresponding to the selected country.

The forms editor

Now that you have an overview of the available fields, let’s see how you can add, edit or remove fields to customize your affiliate forms.

1. Quick walkthrough

To manipulate the fields, you’ll be using the forms editor. You can find it by navigating to your WordPress admin dashboard > SliceWP > Settings > Affiliate fields (tab).

Once there, you will have something similar to the screenshot below:

Affiliate fields editor in SliceWP admin settings page.

You may find the interface a bit overwhelming at first, so let’s break the forms editor into pieces.

Firstly, at the top, you have a drop-down containing a list of all the available fields (the ones we covered in the previous section). Next to the drop-down there’s the “Add Field” button.

Select a new field drop-down, in affiliate fields editor, in SliceWP settings page.

Then, at the bottom, you have a list of all the active fields. These are fields that appear somewhere in your affiliate forms, either on the front-end for your affiliates, only in the admin area, or both (more below).

The fields list in the affiliate fields editor, in SliceWP admin settings page.

As you can notice, each field has some information showing. Let’s go through each element really quickly so you have a better understanding of what this information represents.

Single affiliate field from SliceWP affiliate fields editor.
  1. Sorting area: if you click this area, you’ll then be able to drag-and-drop the field to another position in the list.
  2. Field type: this is the field’s type, which matches with one of the field types available in the “add new field” drop-down from the top of the editor.
  3. Field label: this is the field’s label, which you can customize (more below).
  4. Actions: these are the available actions you can perform on the field, which are:
    • Edit Field: by clicking this link the field’s options panel will appear, where you’ll be able to customize the field to your liking.
    • Remove: by clicking this link you’ll remove the field from the active fields list. Don’t worry if you remove a field by mistake, because you can add it back later.

2. Adding a new affiliate field

Now that you have an overview of the fields editor, let’s add a new field. To do this, just follow the two quick steps below:

  1. From the drop-down field at the top of the editor, select the field type you want to add (I’m going with a Single line text field for this example).
  2. Then, click the Add Field button. As you’ll notice, the new field will be added at the end of the list. Add new affiliate field section from affiliate fields editor in SliceWP settings page.

3. Editing an affiliate field

Now that you added a new field, you’ll quickly realize it’s quite bare. Let’s customize it. To do this, let’s open the field’s options panel by clicking either 1) the Edit Field link or 2) the field’s label.

Affiliate field options panel in SliceWP settings page.

In the field’s options panel you’ll find a handful of settings fields, grouped into several tabs.

If you’ve used a WordPress forms plugin before, you’ll most likely find these settings self explanatory. However, let’s go through a few of the more important options, so you have a better understanding of how to set up your custom affiliate fields.

Field key

The field key option is by far the most important setting of a field. The value you set here will be used as the key for the affiliate field’s value in the database.

Important note: Once you set the value for the Field key and save the plugin’s settings, do not modify it’s value after affiliates start registering for your program

Because the value of the Field key setting is used as a key in the database, it will have values associated with it. If you modify the key, all values saved under the previous key will be decoupled from the new key, which leads to missing data in your user interface.

By default, when you add a new field, the plugin automatically populates this setting with a random string.

However, we highly recommend you to change this setting’s value, when you first add the field, to something relatable to the usage of the field.

For example, if you add a Single Line Text field that you plan to use for the affiliate’s Bank Name, a good value for the Field key setting would be bank_name.

Important note: The value of the Field key must contain only lower case letters, numbers and underscores. For example, sample_field, or sample_field_1.

Show in form

This is another important setting, as it will determine where the field appears in the interface. It has two options:

  1. Affiliate Registration
  2. Affiliate Account Settings

By default, when you add a new field, both these options are enabled. This means the field will appear everywhere it’s intended to appear, namely in the admin area, in the affiliate registration form and in the affiliate’s account, under the settings tab.

You’re free to set the field’s visibility on the front-end to your needs. However, if both options are disabled, the field will still appear in all affiliate related forms from your admin interface.

Was this article helpful?

Do you have any feedback or suggestions to improve this page?

Can't find what you're looking for? We're here to help.

Open a support ticket