Helper method used by `Form::field()` for iterating over an array of multiple fields.

Parameters

  • array $fields An array of fields to render.
  • array $options The array of options to apply to all fields in the `$fields` array. See the `$options` parameter of the `field` method for more information.

Returns

string Returns the fields rendered by `field()`, each separated by a newline.

Source

						protected function _fields(array $fields, array $options = array()) {
		$result = array();

		foreach ($fields as $field => $label) {
			if (is_numeric($field)) {
				$field = $label;
				unset($label);
			}
			$result[] = $this->field($field, compact('label') + $options);
		}
		return join("\n", $result);
	}