DataObject FormBuilder and crosslinks

From: Date: Sun, 07 Aug 2005 18:19:08 +0000
Subject: DataObject FormBuilder and crosslinks
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20315@lists.php.net to get a copy of this message
Hi all, I am a bit confused at the moment trying to solve a problem using FormBuilder but not sure if I am on the right track. Basically I have the following simple database structure: ITEMS table - item_id - cat_id - subcat_id CATEGORIES table - cat_id - name SUBCATEGORIES table - subcat_id - name CAT_RELATIONS table - cat_id - subcat_id I have the following in database.links.ini: [items] cat_id = categories:cat_id subcat_id = subcategories:subcat_id [cat_relations] cat_id = categories:cat_id subcat_id = subcategories:subcat_id I'm using FB to generate a form to create new 'item' entries, and I wish to have 2 select boxes, one for category, and one for subcategory. The catch is I only want the subcategories for the currently selected category to be displayed in the second select box. When a different main category is selected, the select box for subcategory updates automatically. This will probably involve some javascript or a page reload I guess. I have messed around with crosslinks for the past few hours and decided that I can't make them do what I want, and after another hour googling, I thought I would ask if it is even possible. I can think of a couple of kludgey ways that might work, but as always I am hoping there is an elegant way to handle this kind of scenario with FB? Any help appreciated. Cheers, T

« previous php.pear.general (#20315) next »