Inventory field
This is a CCK field that lets you take inventory of a list of items. The items are entered into the field configuration either as a line separated list of strings, or as an array returned from PHP. Then, at node creation time, each of those items has a select box with numbers letting you say how many of that item you have. Below is an example of an Inventory field letting you indicate how many pieces of fruit are in your basket:
Inventory test
Apples:
None12345678910
Oranges:
None12345678910
Peaches:
None12345678910
Plums:
None12345678910
Cherries:
None12345678910
Database representation
The above field is stored in the db like this:
mysql> select * from inventory_items;
+-----+-----+----------------------+----------+-------+
| nid | vid | fieldset | name | count |
+-----+-----+----------------------+----------+-------+
| 58 | 65 | field_inventory_test | Apples | 3 |
| 58 | 65 | field_inventory_test | Oranges | 5 |
| 58 | 65 | field_inventory_test | Peaches | 7 |
| 58 | 65 | field_inventory_test | Plums | 0 |
| 58 | 65 | field_inventory_test | Cherries | 10 |
+-----+-----+----------------------+----------+-------+
Releases
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 5.x-1.x-dev | 2007-Mar-01 | 8.16 KB | Download · Release notes | Development snapshot | |
