QF multiple rows of elements
| From: | Wolfgang Annen | Date: | Tue, 27 Apr 2004 12:34:57 +0000 |
| Subject: | QF multiple rows of elements | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-12158@lists.php.net to get a copy of this message | ||
Hi!
I am trying to create a form for putting in data in line-oriented forms,
e.g. in each row of my form the user puts in a date and an amount. Each row
of the form ist treated as a group but the number of rows can vary.
My problem is that the addGroup-method does not accept an array variable for
all rows. So I have to define each row by a separate addGroup statement.
Here my short example code:
$el[1] = &HTML_QuickForm::createElement('text', 'Datum', null,
'');
$el[2] = &HTML_QuickForm::createElement('text', 'Betrag', null,
'');
$this->addGroup($el, 'row1', 'Zeile:', ' ');
$el[1] = &HTML_QuickForm::createElement('text', 'Datum', null,
'');
$el[2] = &HTML_QuickForm::createElement('text', 'Betrag', null,
'');
$this->addGroup($zeile, 'row2', 'Zeile:', ' ');
I am sure, there exists a much more comfortable way for this, but I didn't
find the solution.
I am very graceful for any hint.
Wolfgang