Recently in Custom Fields Category

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.


About this Archive

This page is an archive of recent entries in the Custom Fields category.

Profiles is the next category.

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