2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Lets you include a nested group of fields inside a template.
|
|
|
|
* This control gives you more flexibility over form layout.
|
|
|
|
*
|
|
|
|
* Note: the child fields within a field group aren't rendered using DefaultFieldHolder. Instead,
|
|
|
|
* SmallFieldHolder() is called, which just prefixes $Field with a <label> tag, if the Title is set.
|
2008-01-09 05:18:36 +01:00
|
|
|
* @package forms
|
|
|
|
* @subpackage fields-structural
|
2007-07-19 12:40:28 +02:00
|
|
|
*/
|
|
|
|
class HiddenFieldGroup extends FieldGroup {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a set of <span class="subfield"> tags, each containing a sub-field.
|
|
|
|
* You can also use <% control FieldSet %>, if you'd like more control over the generated HTML
|
|
|
|
*/
|
|
|
|
function Field() {
|
|
|
|
$fs = $this->FieldSet();
|
|
|
|
$content = "<span class=\"fieldgroup\">";
|
|
|
|
foreach($fs as $subfield) {
|
|
|
|
$content .= $subfield->SmallFieldHolder() . " ";
|
|
|
|
}
|
|
|
|
$content .= "</span>";
|
|
|
|
|
|
|
|
return $content;
|
|
|
|
}
|
|
|
|
function FieldHolder() {
|
|
|
|
return $this->renderWith("HiddenFieldHolder");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|