Statistics:

405 joined fanlistings and 40 owned.

Newest Joined

Newest Joined: Misfits

Newest Owned

Newest Owned: John Mitchell Fanlisting

Random Joined

Random Joined: Wordpress

Random Owned

Random Owned: Archaeology Fanlisting

Even Flow collective

Additional fields in Enthusiast 3.x

Sometimes, it's great to ask for additional information (to go with the required: name, email and country). For example, if you run a fanlisting for a band, it's nice to ask people for their favorurite song (or album) by that band. If you own a fanlisting for an actor, ask for favoruite movie. For author, you may ask for favourite book, and in case of a movie or a novel, you may ask for favourite character.

Adding additional field(s) in Enthusiast 3.x is pretty easy, but it's always better if you customize the fields (add dropdown, perhaps?) and display info on Members page, along with people's other information.

In this tutorial, I'll show you how to add, customize and display additional fields (in Enthusiast 3.x).

1. Adding field(s)

This is really easy. Log in to your Enthusiast dashboard, go to "owned" and pick a fanlisting. Choose "edit" and in the edit menu pick "database".

Making additional fields is easy; all you have to do is pick a name for your additional field and type it into the box. Note: Field name must be all lowercase, without spaces and special characters. However, this rule doesn't limit you to one word. You may still use underscores (for example: favourite_character is perfectly ok name for a field). However, you don't have to worry too much about it. While the name you type here will appear on your join page (for example, favourite_character will produce "Favourite character"), you can always change this.

You can add more additional fields. Just click the "x" sign and new box will appear. Asign a name for each additional field you want to have. And that's it, really. Your new field(s) will appear on your join page, like this:

2. Customizing

This is nice, but what if you want to customize your additional fields? For example, specify a question you want to ask, add a default answer or make a drop-down menu?

You must create a new .php file and name it addform.inc.php. This file will hold all of customizing information about your additional fields.

To customize an additional field, simply put an appropriate piece of HTML in your addform.inc, just like you customize any other (input) field on your website. Just make sure you give the field the same name you gave to your additional field.

For example:

<p>Your question<br/>
<input type="text" name="field_name" size="desired size" value="default value" /></p>

Say you want to ask question: "What is your favourite song", in the input box with the size of 20, and default value "All":

<p>What is your favourite song:<br />>br/> <input type="text" name="favourite_song" size="20" value="All" / ></p>

Simply replace favourite_song with your field name.

Making a dropdown

To make a field drop down menu, simply specify options in your addform.inc.php:

<p>Title<br/>
<select name="filed_name">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>

For example:

<p>Your favourite character?<br />
<select name="favourite_character">
<option>All</option>
<option>Tiana</option>
<option>Prince Naveen</option>
<option>Dr Facilier</option>
<option>Charlotte</option>
<option>Louis</option>
<option>Ray</option>
<option>Mama Odie</option>
</select></p>

Result:

Please note that these changes will affect join.php page only. If people decide to change their info, update.php page will still display ordinary (non customized) fields. If you really wish to have all customizations (dropdown, default values) on update page, you will have to modify show_update.php file, which is located in the root of your fanlisting collective.

Open show_update.php and find these lines:

<p>if( $info['additional'] && file_exists( 'updateform.inc.php' ) ) { require_once( 'updateform.inc.php' );</p>

Replace them with:

<p>if( $info['additional'] && file_exists( 'addform.inc.php' ) ) { require_once( 'addform.inc.php' );</p>

This change will affect all of your fanlistings.

3. Displaying

What's the point in having additional fields if you're not going to display them on the members page along with people's names, emails and countries?

To do this, you must edit Templates. Go to owned fanlistings, pick the one you want to customize, click edit and go to templates. You must customize members list template. All you have to add is your additional field, like this:

$$fan_(field name)$$

For example:

$$fan_favourite_song$$

Note: If you're still not displaying people's countries, do it by adding $$fan_country$$ to your members list template.

Template example:

<p><b>$$fan_name$$</b><br />
$$fan_email_generic$$ $$fan_url_generic$$ $$fan_country$$ $$fan_favourite_song$$ $$fan_favourite_album$$</p>

Members list example:

Back to articles