Custom Footprint example
This example shows two custom Footprint elements, one with a closed set of values, another with a free text value restricted by a regular expression.
<footprints xmlns="http://www.sdltridion.com/2011/SiteEdit">
---built-in Footprints---
<footprint ID="gender" ClaimUri="taf:claim:audiencemanager:contact:extendeddetail:gender">
<settings />
<title>
<value>Gender</value>
<value lang="1031">Geschlecht</value>
</title>
<description ID="genderdesc">
<value>Specify the gender of the visitor.</value>
<value lang="1031">Geben Sie das Geschlecht des Besuchers.</value>
</description>
<values>
<value text="F" default="true">
<label>female</label>
<label lang="1031">weiblich</label>
</value>
<value text="M">
<label>male</label>
<label lang="1031">männlich</label>
</value>
</values>
</footprint>
<footprint ID="customercode">
<settings>
<isMandatory>true</isMandatory>
<regExp>^CC[0-9]{4}[A-Z]{2}$</regExp>
</settings>
<title>
<value>Customer code</value>
<value lang="1031">Kundennummer</value>
</title>
<description ID="custcodedesc">
<value>Specify the customer code of the visitor (must start with CC).</value>
<value lang="1031">Geben Sie die Kundennummer des Besuchers (muß mit CC anfangen).</value>
</description>
<values>
<value text="" default="true">
<label>(Enter a value)</label>
<label lang="1031">(Wert eingeben)</label>
</value>
</values>
</footprint>
</footprints>
The first Footprint, with the ID gender, lets the user choose between a 'female' value (the default) or a 'male' value. Labels are available for the selection control (German for German visitors, English for all others), and result in the shorthand values 'F' for female, or 'M' for male.
The second Footprint, with the ID customercode, has a text-based field that is set to the empty string by default (visualized as "(Enter a value)" or its German translation), but this is not a valid value, because the field is mandatory. Moreover, the value of the field must consist of two capital Cs followed by four digits and two more capital letters.