DBDOFB: Proposal for new configuration option
| From: | arnaud sellenet bodin | Date: | Tue, 31 Jan 2006 11:32:39 +0000 |
| Subject: | DBDOFB: Proposal for new configuration option | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-41148@lists.php.net to get a copy of this message | ||
Hi
I've tuned my local copy of DB_DataObject_FormBuilder, adding a non-obstrusive configuration option called fb_crossLinkAutoCheck
If set to true in the crosslinktable DataObject, and if fb_crossLinkExtraFields is set in this DataObject, the elementTable will be displayed with hidden fields instead of checkboxes.
For example, I use it for a product table which handles a different price depending on the zone the customer is in.
The tables :
Zones
id PK
name varchar(150)
Product_zone
id PK
idZone FK = Zones:id
idProduct FK = Products:id
price float
Products
id PK
name varchar (150)
In Product_zone.php I have :
var $fb_crossLinkExtraFields = array('price');
var $fb_crossLinkAutoCheck = true;
Please notice that if $fb_crossLinkAutoCheck is set to true but $fb_crossLinkExtraFIelds is not set this will have no effect.
So do you think it's worth add this to the current release ?
\ | /
Arnaud Sellenet-Bodin
Dév et dés
http://demental.info
Tel : 05 63 55 24 46
/ | \