Back to Form class

Method renderFieldset

public string
renderFieldset
(mixed $name, mixed $options = [])
Method to get all control groups with label and input of a fieldset.
Parameters
  • string $name The name of the fieldset for which to get the values.
  • array $options Any options to be passed into the rendering of the field
Returns
  • string A string containing the html for the control goups
Since
  • 3.2.3
Class: Form
Project: Joomla

Method renderFieldset - Source code

/**
 * Method to get all control groups with label and input of a fieldset.
 *
 * @param   string  $name     The name of the fieldset for which to get the values.
 * @param   array   $options  Any options to be passed into the rendering of the field
 *
 * @return  string  A string containing the html for the control goups
 *
 * @since   3.2.3
 */
public function renderFieldset($name, $options = [])
{
    $fields = $this->getFieldset($name);
    $html = [];
    foreach ($fields as $field) {
        $html[] = $field->renderField($options);
    }
    return implode('', $html);
}