I use QuickForm, this form allow users input values, one or more. How I can receive that values in array?
$form = & $this->init_module('Libs/QuickForm');
$text = array();
for($i = 0; $i < 20; $i++)
{
$text[] = $form->createElement('text', 'name[]', 'Name');
}
$form->addGroup($text);
$submit = $form->createElement('submit', 'add_new', 'Add');
$form->addGroup(array($submit));
if($form->validate())
{
$values = $form->exportValues();
print_r($values); // names unavailable
}
$html .= $form->toHtml();
return $html;