MTCustomFieldHTML
追加したフィールドの入力フォームを表示するファンクションタグです。記述箇所のコンテキストにより対象となるカスタムフィールドが異なります。
例えば MTEntryCustomFields タグのコンテキストで使用すると、システムオブジェクトが『記事』のカスタムフィールドの入力フォームを表示します。
出力内容は以下のように input タグが使用されます。
テキスト: <input type="text" name="customfield_cfbasename" id="customfield_cfbasename" class="text" value="" /> 画像: <input type="file" name="file_customfield_cfbasename" id="entry-file" class="fi" /> <input type="hidden" name="type_customfield_cfbasename" value="image" />
- 使い方
<form method="post" action="<$mt:CGIPath$><$mt:CommentScript$>" name="comments_form" id="comments-form" onsubmit="return mtCommentOnSubmit(this)">
  <input type="hidden" name="static" value="1" />
  <input type="hidden" name="entry_id" value="<$mt:EntryID$>" />
  <input type="hidden" name="__lang" value="<$mt:BlogLanguage$>" />
  <input type="hidden" name="parent_id" value="<$mt:CommentParentID escape="html"$>" id="comment-parent-id" />
  <input type="hidden" name="armor" value="1" />
  <input type="hidden" name="preview" value="" />
  <input type="hidden" name="sid" value="" />
  <div id="comments-open-data">
    <div id="comment-form-name">
<label for="comment-author">名前</label>
<input id="comment-author" name="author" size="30" value="" onfocus="mtCommentFormOnFocus()" />
    </div>
    <div id="comment-form-email">
<label for="comment-email">電子メール</label>
<input id="comment-email" name="email" size="30" value="" onfocus="mtCommentFormOnFocus()" />
    </div>
    <div id="comment-form-url">
<label for="comment-url">URL</label>
<input id="comment-url" name="url" size="30" value="" onfocus="mtCommentFormOnFocus()" />
    </div>
    <div id="comment-form-remember-me">
<input type="checkbox" id="comment-bake-cookie" name="bakecookie" onclick="mtRememberMeOnClick(this)" value="1" accesskey="r" />
<label for="comment-bake-cookie">サインイン情報を記憶</label>
    </div>
  </div>
  <div id="comment-form-reply" style="display:none">
    <input type="checkbox" id="comment-reply" name="comment_reply" value="" onclick="mtSetCommentParentID()" />
    <label for="comment-reply" id="comment-reply-label"></label>
  </div>
  <div id="comments-open-text">
    <label for="comment-text">コメント<mt:IfAllowCommentHTML>(スタイル用のHTMLタグを使えます)</mt:IfAllowCommentHTML></label>
    <textarea id="comment-text" name="text" rows="15" cols="50" onfocus="mtCommentFormOnFocus()"></textarea>
  </div>
  <div id="comment-customfields">
<mt:CommentCustomFields>
    <div id="comment-<$mt:CustomFieldBasename$>">
    <$mt:CustomFieldName escape="html"$><mt:CustomFieldIsRequired>(必須)</mt:CustomFieldIsRequired>
    <p class="comment-description"><$mt:CustomFieldDescription nl2br="xhtml"$></p>
    <$mt:CustomFieldHTML$>
    </div>
</mt:CommentCustomFields>
  </div>
  <div id="comments-open-captcha"></div>
  <div id="comments-open-footer">
    <input type="submit" accesskey="v" name="preview_button" id="comment-preview" value="プレビュー" onclick="this.form.preview.value='1';" />
    <input type="submit" accesskey="s" name="post" id="comment-submit" value="投稿" />
  </div>
</form>
