private function appendFields($form, $inputs, $values)
{
foreach ($inputs as $name => $arg) {
preg_match("/^([^[]+)\\[(.+)\\]\$/", $name, $m);
if (!empty($m)) {
$seq = (int) $m[2];
$value = array_get($values, "{$m['1']}.{$seq}");
$name = $m[1] . '[]';
} else {
$value = array_get($values, $name);
}
$arg['name'] = $name;
$type = array_get($arg, '_type');
unset($arg['_type']);
array_set($arg, 'value', $value);
$uio = 'form' . ucfirst($type);
$input = uio($uio, $arg);
$field = $this->wrapInput($name, $input);
$sectionName = array_get($arg, '_section');
unset($arg['_section']);
$style = array_get($this->arguments, 'type', 'panel');
$section = $this->getSection($form, $sectionName, $style);
$field->appendTo($section);
}
}