Date: 08/27/00
- Next message: Peter Holm: "[phplib] Once again: Phplib with Flash?"
- Previous message: Jelena Pjesivac: "[phplib] Question about migrating to ldap (again)"
- Next in thread: Jeroen Laarhoven: "Re: [phplib] Stuffing $db->("bla") into add_element()"
- Reply: Jeroen Laarhoven: "Re: [phplib] Stuffing $db->("bla") into add_element()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
The following returns an empty form element:
$f = new form;
$f->add_element(array( ....., "value"=>$db->f("col1"), ....));
whereas this works perfectly but is cumbersome if you have >30 elements:
$tmp = $db->f("col1");
$f->add_element(array( ....., "value"=>$tmp, ....));
This also works, but is also suboptimal (too much code):
$Title = $db->f("col1");
$f->add_element(array("name"=>"Title", ....));
What am I doing wrong? Why can't I put the value directly into the form
element?
Or is there some other clever way of pre-filling a form with a fixed layout
(so no table or something is possible) with a database query result?
-- ciao, Jens (mailaddr im Header) http://www.pinguin.conetix.de "Schiebe nie etwas auf Boshaftigkeit, was http://www.hitch-hiker.de ausreichend durch Dummheit erklärt werden kann." http://www.linuxfaq.de
- application/pgp-signature attachment: stored
- Next message: Peter Holm: "[phplib] Once again: Phplib with Flash?"
- Previous message: Jelena Pjesivac: "[phplib] Question about migrating to ldap (again)"
- Next in thread: Jeroen Laarhoven: "Re: [phplib] Stuffing $db->("bla") into add_element()"
- Reply: Jeroen Laarhoven: "Re: [phplib] Stuffing $db->("bla") into add_element()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

