Plugin: Install and Configure More Custom Fields
- Overview
- Install and Configure
- Template Tags
- Changelog & Known Issues
- Looking for support? Use the Helpdesk
Install
To use More Custom Fields, you’ll first need to get the files in place on your server.
- Get More Custom Fields by downloading from Github. Extract the archive.
- Upload the
plugins/folder to your Movable Type Pro installation. - Upload the
extlib/YAML/Tiny.pmfile to overwrite[MT_HOME]/extlib/YAML/Tiny.pmin your Movable Type Pro installation.
That’s it!
Configure
More Custom Fields creates several additional field types that are available when defining custom fields:
- Checkbox Group
- Radio Buttons with Input
- Selected Entries
- Selected Pages
- Selected Assets (and “child” types: Selected Images, Selected Audios, Selected Videos, Selected Files, and any other type of registered asset)
- Multi-Use Single-Line Text Group
- Message
Use these field types as you would any other: from the Preferences menu select Custom Fields, and create a new custom field.
The Checkbox Group field type options should be specified in a comma-delimited list. Each item in the list will become a checkbox.
The Radio Buttons with Input field type options should be specified in a comma-delimited list. Each item in the list will become a radio button. The last item in the list will have a text input field appended to it, so you’ll likely want to specify the last item as “Other” or similar.
The Selected Entries and Selected Pages field types provides the ability to select Entries or Pages — as many as needed, in whatever order is needed. Specify a blog ID as this field’s option to determine which blog’s Entries (or Pages) are available for selection. Blog IDs must be separated with a comma to create a string (as in “1,12,19,37,112”), or the value “all” may be used to include all blogs. Leaving this field blank will make the current blog’s Entries (or Pages) available.
The Selected Assets field type (and the related asset types) work similar to the Selected Entries and Selected Pages field types: select an unlimited number of assets in any order you wish. This field type has no options and works on the current blog only.
The Multi-Use Single-Line Text Group field type is a mouthful. A breakdown of this field: The Single-Line Text field is included with MT Pro and lets you create a one-line text field. This field type can have many single-line text fields grouped together. Lastly, this is a multi-use field and provides an “add another group” button to add a limitless recurrence of the text fields you’ve defined. A popular use for this is to display URLs (with “Link Name” and “Link URL” text fields), and being multi-use means that an author can provide many URLs. Specify a comma-separated list of text field labels. Example: “Link Name,Link URL”.
The Message field type should receive a default value. This value is the “message” displayed for all other users. The field options allow you to specify whether no user should be able to edit the field data, or if administrators should be able to override the supplied default.
Lastly, use your new fields! Don’t forget to place them in your templates.
Using More Custom Fields with your Theme
If you’re building your site as a theme, custom fields can be specified and automatically created when the theme is applied (refer to Theme Manager for more information). A list of the field types along with their keys is below, which may help expedite your theme creation.
- Checkbox Group:
checkbox_group - Multi-Use Single-Line Text Group:
multi_use_single_line_text_group - Radio Buttons (with Input field):
radio_input - Selected Assets:
selected_assets - Selected Entries:
selected_entries - Selected Pages:
selected_pages - Message:
message
Note that the Selected Assets field actually creates a different custom field for each type of asset field available (Selected Images, Selected Videos, etc). These fields can also be used, though because they are dynamically generated you’ll need to determine the name of the field yourself. The following format is followed:
selected_[asset type]s
So, valid field types defined by the Community Pack would include:
- Selected Audios:
selected_asset.audios - Selected Images:
selected_asset.images - Selected Videos:
selected_asset.videos