For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > April 2004 > Re: [PEAR] QF multiple rows of elements









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] QF multiple rows of elements
Bertrand Mansion

2004-04-27, 12:13 pm

<wolfgang.annen@web.de> wrote=A0:

> Hi!
>=20
> 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 r=

ow
> of the form ist treated as a group but the number of rows can vary.
>=20
> 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.
>=20
> Here my short example code:
>=20
> $el[1] =3D &HTML_QuickForm::createElement('text', 'Datum', null, '');
> $el[2] =3D &HTML_QuickForm::createElement('text', 'Betrag', null, '');
>=20
> $this->addGroup($el, 'row1', 'Zeile:', ' ');
>=20
> $el[1] =3D &HTML_QuickForm::createElement('text', 'Datum', null, '');
> $el[2] =3D &HTML_QuickForm::createElement('text', 'Betrag', null, '');
>=20
> $this->addGroup($zeile, 'row2', 'Zeile:', ' ');
>=20
> I am sure, there exists a much more comfortable way for this, but I didn'=

t
> find the solution.


I don't see what is uncomfortable here ?

Bertrand Mansion
Mamasam
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com