I'm need a Form Element that I can slot into several forms in this case for selecting location details but the theory runs for anything.
Ideally I want to AHAH enable it so that I can check and update it as they fill the form in pro to submission.
So Far I've worked out.
Build the element in a #process callback (where previous values are in #default_value)
Check it in a #element_validate callback (where previous values are in $element (the first parameter) but if you need to update or add anything change the second parameter that is passed by ref.
The only thing I've really got on using AHAH is to get the whole form to build and work correctly without it then add it afterwards.
But I can see how I get just the element to use AHAH and then be able to just drop it into any form later.
I've looked at most of the documentation and it seams a bit complex.
I'm using Drupal 6
Any help or guidance would be much appreciated.
Peter