Inventory field

Abandoned Modules - February 28, 2007 - 20:07

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 snapshotsDateSizeLinksStatus
5.x-1.x-dev2007-Mar-018.16 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.
 
 

Drupal is a registered trademark of Dries Buytaert.