containing sets of radio buttons and labels. The IDs are set to * FieldID_ItemKey, where ItemKey is the key with all non-alphanumerics removed. */ function Field() { $options = ''; $odd = 0; foreach($this->source as $key => $value) { $itemID = $this->id() . "_" . ereg_replace('[^a-zA-Z0-9]+','',$key); if($key == $this->value/* || $useValue */) { $useValue = false; $checked = " checked=\"checked\""; } else { $checked=""; } $odd = ($odd + 1) % 2; $extraClass = $odd ? "odd" : "even"; $extraClass .= " val" . str_replace(' ','',$key); $options .= "
  • name\" type=\"radio\" value=\"$key\"$checked />
  • \n"; } $id = $this->id(); return "\n"; } function performReadonlyTransformation() { // Source and values are DataObject sets. $items = $this->source; $field = new LookupField($this->name,$this->title ? $this->title : "" ,$items,$this->value); $field->setForm($this->form); return $field; } function ExtraOptions() { return new DataObjectSet(); } } ?>