Invoice editing in QF/DataObject or FB?
| From: | Ken Restivo | Date: | Mon, 21 Mar 2005 21:05:48 +0000 |
| Subject: | Invoice editing in QF/DataObject or FB? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18211@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I need to implement the following common pattern, and I don't want to reinvent the wheel. In
fact, I don't want to invent it at *all*, if I can avoid it.
The most familiar example of the problem is an "invoice screen", that lets you start up a
new invoice, enter the information that goes into the "invoice" table, then also shows a
summary (HTML_Table or frozen QF) of each of the "line items", whose data goes into the
line_items table. I need to show all the line items, and let people add/remove/edit line items,
coming BACK to the invoice screen when they are done (or ideally expanding/hiding the line items--
but probably not possible due to prohibition against nested forms in HTML).
This pattern is needed in a half-dozen other places in my application. In fact, I'd imagine
it's incredibly common in relational database applications: a million interlinked tables, that
the users have to edit and deal with.
A corrolary to this is the case where the user is choosing from a pop-up the linked fields (in this
case using ->fb_linkDisplayFields), but more often than not needs a "NEW" or
"OTHER" button to add one that *isn't* in the database: so the pop-up needs a
"New" or "Other" link next to it, which will bump them to a screen to enter a
new record for the linked table, then after validating and processing, go back to where the user was
(with all their other data intact!) with the new record's ID pre-selected in the pop-up.
Again, I cannot imagine how anyone can build a usable interface to a relational database without
this, so I can't possibly be the first to bump up against this. There must be example PEAR code
galore. Unfortunately, I haven't had luck finding it.
Are there any examples of this kind of "invoice screen" in QF/DataObjects or FB? It's
similar to a "shopping cart", so I'd assume this has been done a million times.
- -ken
- --
- ---------------
The world's most affordable web hosting.
http://www.nearlyfreespeech.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCPzcse8HF+6xeOIcRAmjKAKCG24DyML9GXLdNQ4C5FoPR2I8y3wCfR8XG
fPKgv1UcNR0CgRymPusrk+U=
=/K7E
-----END PGP SIGNATURE-----