Skip to content

Commit 3521ba1

Browse files
committed
Merge pull request #87 from vchabot/multiple-file
Fix render method for sfWidgetFormInputFileMulti
2 parents fa96092 + e46f73b commit 3521ba1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/widget/sfWidgetFormInputFileMulti.class.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ protected function configure($options = array(), $attributes = array())
3939
*/
4040
public function render($name, $value = null, $attributes = array(), $errors = array())
4141
{
42-
$name .= $this->getOption('multiple') ? '[]' : '';
43-
return $this->renderTag('input', array_merge(array('type' => $this->getOption('type'), 'name' => $name, 'value' => $value, 'multiple' => $this->getOption('multiple')), $attributes));
42+
if ($this->getOption('multiple'))
43+
{
44+
$name .= '[]';
45+
$attributes['multiple'] = $this->getOption('multiple');
46+
}
47+
48+
return parent::render($name, $value, $attributes, $errors);
4449
}
4550
}

0 commit comments

Comments
 (0)