On Wednesday 30 March 2005 09:32, Morbus Iff wrote:
I'm not sure why you actually /need/ the $vid.
The problem is that when I call taxonomy_form() for each $vid, I need to pass this function the array containing all the current selections for that particular vid's terms. It's not that I can't *get* the tids I need for taxonomy_save(), but rather that I have no good way to pass them back to taxonomy_form() when the user clicks "preview". Your comments do raise another possibility, though, in that I could simply walk through the complex array and make a simple one containing *all* the tids for *all* the vocabs represented on my page. Presumably taxonomy_form does an array search as it emits each <OPTION> tag, to see if that particular tid should get SELECTED or not. If there are extra tids listed in the array, one would presume that they would simply never match on the searches, and would therefore do no harm. It also occurs to me that for my particular module, maybe I just don't need the preview feature at all. I built a dummy "preview" submit button for testing, but maybe in real life all I need is "Make It So, Mr. Crusher!" to actually do the import. That would make those tid numbers a one-way trip, never going back to the UI at all. Scott -- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them scott@4th.com | having a bad operating system." -- Linus Torvalds http://4th.com/ | ("The Rebel Code," NY Times, 21 February 1999) | PGP Public Key at http://4th.com/keys/scott.pubkey