I've gotten pretty far through the multipage form documentaiton, and everything seems to be working great so far, but I have one more issue that I can't seem to work out. I've done a quick search through drupal and through the mailing list and have not found anything that will help me so I thought I'd post something here.
My form consists of two pages. Page one has a taxonomy dropdown and a next button. Page two presents different form elements based on the choice made on page one.
Because the number of fields that are presented on the second page and the complex structure of these elements, it seems like it would be cumbersome to try and load the entire structure for all taxonomy items and only show the one the user selected. It seems like this would be a performance hit as well. As a result, I am looking to generate these items in a different place.
I can generate form elements just fine in my hook_form_alter function, but taxonomy is below my module in the process list and I can't seem to access the value of taxonomy at this point.
I can access the value of the taxonomy item in my form's pre_render function, but when I try to add these new elements I get the proper html structure, but without any ids, form names, etc.
My questions:
1. Am I correct in thinking that the pre_render function is too late in the FAPI flow to properly generate form elements?
2. Is there a way to get the taxonomy's selected term value in my form_alter function?