Creating Custom Fields

For most system objects (entries, categories etc.), you can create custom fields on both the blog level (such that the fields only appear for their blog) or the system level (such that fields appear for all blogs on the system). For some system objects, however, only one of these context may apply (for example with author fields, they are only available at the system level).

To create fields:

  1. Click Preferences > CustomFields (at either the blog or system level as needed). This will take you to the field listing page (which lists all the fields for the current context).

    CustomFields Listing

  2. To edit a field, simply click its name. To create a new field click the New Field link above the table on the left hand side. Either action will take you to the field editing page:

    Editing a CustomField

  3. Fill out this page as needed (the fields should be fairly self explanatory) by choosing the system object this field is for, entering a name and selecting the type of field.

  4. Depending on the type of field you have selected, further fields may appear (for example an Options field for Drop Down Menus or Default).

  5. The basename field is similar to the entry/page and category/folder basename fields. It should be unique across your entire Movable Type installation as it will be used within the database to identify and store information for this field.

  6. Finally, the Template Tag field is automatically populated depending on the System Object chosen and Name entered. You may, of course, change this tag to something more convenient. Note: This field, too, must contain a value unique for your entire system. Click the Example Template Code link to open a code block that can be used in a template to display data stored for this field.

  7. On clicking Save, you will be greeted by this message:

    Thumbnail image for CustomFields Table Maintenance Message

    You may disregard it until you have finished making changes to the CustomFields configuration. After you are done, however, ensure that you follow its instructions and click the upgrade link. This will take you to the familiar upgrade wizard which will ensure that your database is ready to work with the custom fields.

Entry Fields

By default, entry fields will not appear on the entry editing screen and must be first enabled. To do so, from the new/edit entry screen, simply click Display Options on the right hand sidebar and check the boxes next to the fields you wish to display.

Display Options Widget

You can also customize the fields that will appear by default for authors from the Preferences > Blog Settings > Entries screen (under Default Editor Fields). Simply check the fields you would like to display by default and hit Save Changes.

Default Entry Editor Fields

Reordering Fields

Usually, on the screens that display custom fields, a sidebar widget will appear that will allow you to change the order the custom fields appear. To reorder the fields, open the sidebar widget, drag and drop the bars to the desired order and click Save. This will run a background save (to make sure you do not lose what you are currently working on). Your fields will match the new order when you next load the screen.

Reorder Fields Widget

3 Comments

Michael Heraghty said:
on Dec 5, 2007 12:17 PM | Reply

I've recently installed Custom Fields in MT4 and so far, so great.

However, I have not been able to figure out how to add a date field with (or even without!) a pop-up calendar.

I can't seem to find any instructions on how to do this either. Please help.

gspatel said:
on Dec 7, 2007 3:54 AM | Reply

Michael's right: you don't get a date field, either at the system level or the blog level.

The changelog seems to suggest that there were some issues with datetime functions that were sorted out. Are we missing something here? Everything else works beautifully.

gspatel said:
on Dec 7, 2007 11:07 AM | Reply

Michael:

There's a problem with the downloadable. I checked on the forums, and found a bunch of links to the trac, where updates are posted. The downloadable is missing files required for the date/time fields. I've put together a tarball and emailed it to Arvind. Hopefully, he'll have it uploaded soon.

About

This is part of the official user manual for CustomFields, a plugin for Movable Type by Arvind Satyanarayan.

More Information »

Screenshots

Click a screenshot to browse through the gallery or the arrows to flip through them

←→

I Heart Melody