Not a developer? Go to MovableType.com

Documentation

CustomFieldHTML

Returns the html necessary to place this field in a blog-side Create Entry form for the object in context.

<$mt:CustomFieldHTML$>

See mt:EntryCustomFields for more documentation.

Form elements are prefilled with with the default values specified when custom fields are defined. Noted below with “” in the case of text elements or as the selected value for radio buttons and checkboxes.

Note: The generated html doesn’t necessarily have the best markup. Until updated workaround is to strip undesired markup using regex_replace or to take the output and then hardcode the html into the template.

Values

Single-Line Text

<div class="textarea-wrapper">
    <input type="text" name="customfield_favorite_food" id="customfield_favorite_food" value="<!-- value here -->" class="full-width ti" />
</div>

Embed

<div class="textarea-wrapper">
    <textarea name="customfield_embed" id="customfield_embed" class="full-width ta" rows="3" cols="72"><!-- object param embed code here --></textarea>
</div>

Multi-Line Text

<div class="textarea-wrapper">
    <textarea name="customfield_multilinetext" id="customfield_multilinetext" class="full-width ta" rows="3" cols="72"><!-- value here --></textarea>
</div>

Checkbox

Default is checked; value = 1.

<input type="hidden" name="customfield_checkbox_cb_beacon" value="1" />
<input type="checkbox" name="customfield_checkbox" value="1" id="customfield_checkbox" class="cb" />
<label class="hint" for="customfield_checkbox">Description for Checkbox</label>

URL

    <div class="textarea-wrapper">
        <input type="text" name="customfield_eurl" id="customfield_eurl" value="http://google.com" class="full-width ti" />
    </div>

DateTime

<span class="date-time-fields">
    <input id="d_customfield_datetime" class="entry-date" name="d_customfield_datetime" tabindex="10" value="" />
    <input class="entry-time" name="t_customfield_datetime" tabindex="11" value="" />
</span>

Select Menu

Options: Foo, Bar, Baz

<select name="customfield_selectmenu" id="customfield_selectmenu" class="se" mt:watch-change="1">
    <option value="Foo">Foo</option>
    <option value="Bar" selected="selected">Bar</option>
    <option value="Baz">Baz</option>
</select>

Radio Buttons

Options: Foo, Bar, Baz

<ul class="custom-field-radio-list">
    <li>
        <input type="radio" name="customfield_radiobuttons" value="Foo" id="customfield_radiobuttons_1" class="rb" />
        <label for="customfield_radiobuttons_1">Foo</label>
    </li>
    <li>
        <input type="radio" name="customfield_radiobuttons" value="Bar" id="customfield_radiobuttons_2" checked="checked" class="rb" />
        <label for="customfield_radiobuttons_2">Bar</label>
    </li>
    <li>
        <input type="radio" name="customfield_radiobuttons" value="Baz" id="customfield_radiobuttons_3" class="rb" />
        <label for="customfield_radiobuttons_3">Baz</label>
    </li>
</ul>

Asset

<input type="file" name="file_customfield_asset" id="entry-file" class="fi" />
<input type="hidden" name="type_customfield_asset" value="asset" />

Audio

<input type="file" name="file_customfield_audio" id="entry-file" class="fi" />
<input type="hidden" name="type_customfield_audio" value="audio" />

Image

<input type="file" name="file_customfield_image" id="entry-file" class="fi" />
<input type="hidden" name="type_customfield_image" value="image" />

Video

<input type="file" name="file_customfield_video" id="entry-file" class="fi" />
<input type="hidden" name="type_customfield_video" value="video" />
Back