'textwithbutton' => 'HTMLTextFieldWithButton',
'textarea' => 'HTMLTextAreaField',
'select' => 'HTMLSelectField',
+ 'combobox' => 'HTMLComboboxField',
'radio' => 'HTMLRadioField',
'multiselect' => 'HTMLMultiSelectField',
'limitselect' => 'HTMLSelectLimitField',
return $this->mMethod;
}
+ /**
+ * Wraps the given $section into an user-visible fieldset.
+ *
+ * @param string $legend Legend text for the fieldset
+ * @param string $section The section content in plain Html
+ * @param array $attributes Additional attributes for the fieldset
+ * @return string The fieldset's Html
+ */
+ protected function wrapFieldSetSection( $legend, $section, $attributes ) {
+ return Xml::fieldset( $legend, $section, $attributes ) . "\n";
+ }
+
/**
* @todo Document
*
$v = empty( $value->mParams['nodata'] )
? $this->mFieldData[$key]
: $value->getDefault();
- $html[] = $value->$getFieldHtmlMethod( $v );
- $labelValue = trim( $value->getLabel() );
- if ( $labelValue != ' ' && $labelValue !== '' ) {
- $hasLabel = true;
- }
+ $retval = $value->$getFieldHtmlMethod( $v );
+
+ // check, if the form field should be added to
+ // the output.
+ if ( $value->hasVisibleOutput() ) {
+ $html[] = $retval;
+
+ $labelValue = trim( $value->getLabel() );
+ if ( $labelValue != ' ' && $labelValue !== '' ) {
+ $hasLabel = true;
+ }
- if ( get_class( $value ) !== 'HTMLHiddenField' &&
- get_class( $value ) !== 'HTMLApiField'
- ) {
$hasUserVisibleFields = true;
}
} elseif ( is_array( $value ) ) {
if ( $fieldsetIDPrefix ) {
$attributes['id'] = Sanitizer::escapeId( "$fieldsetIDPrefix$key" );
}
- $subsectionHtml .= Xml::fieldset( $legend, $section, $attributes ) . "\n";
+ $subsectionHtml .= $this->wrapFieldSetSection( $legend, $section, $attributes );
} else {
// Just return the inputs, nothing fancy.
$subsectionHtml .= $section;