September 2008 Archives

1.  Create Custom Fields

In System Overview, select Preferences > Custom Fields

Select +New Field

2.  Edit Registration Form

Go to System Overview > Design > Templates > Registration Form

Add this code:

<mt:loop name="field_loop">
<mt:if name="__first__">
<input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" />
</mt:if>
<!-- start-customfield_<mt:var name="basename"> -->
<mtapp:setting
id="$field_id"
label="$name"
hint="$description"
shown="$show_field"
show_hint="$show_hint"
required="$required">
<mt:var name="field_html">
</mtapp:setting>
<!-- end-customfield_<mt:var name="basename"> -->
</mt:loop>

Then select Save.

3.  Edit Profile Form

Go to System Overview > Design > Templates > Profile Edit Form

Add the same code as above.

4.  If you only want to display one custom field in certain area on a form, and not all of them in a row, then use If statements.  Here's an example if the custom field you want to use is named "Website Name" with a basename of "website_name".

<mt:if name="field_id" eq="customfield_website_name">
</mt:if>

Your custom field's basename, preceded by "custom field".

Example:

<mt:loop name="field_loop">
<mt:if name="__first__">
<input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" />
</mt:if>
<!-- start-customfield_<mt:var name="basename"> -->
<mt:if name="field_id" eq="customfield_website_name">
<mtapp:setting
id="$field_id"
label="$name"
hint="$description"
shown="$show_field"
show_hint="$show_hint"
required="$required">
<mt:var name="field_html">
</mtapp:setting>
</mt:if>
<!-- end-customfield_<mt:var name="basename"> -->
</mt:loop>

Thanks to Aaron Vanderzwan for this last tip.


I just finished installing Movable Type 4!

| 1 Comment
Welcome to my new blog powered by Movable Type. This is the first post on my blog and was created for me automatically when I finished the installation process. But that is ok, because I will soon be creating posts of my own!

About this Archive

This page is an archive of entries from September 2008 listed from newest to oldest.

October 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.