[development] Using AHAH to load a default set of fields and values

Jeff Hartman lists at jeffhartman.com
Tue Jan 18 23:43:22 UTC 2011


Hi list,

First post.

I have a particular content type where I have a vocabulary/taxonomy drop down. I am using hook_form_alter to modify this menu to use ahah in order to query the db for a bunch of default values to populate other portions of the form.

The data is retrieve fine, the fields display within the form properly, but none of the values populate the fields (not 100% true because only the textarea field does, but none of the others).

Once I change the fields to use "#value" instead of "#default_value", all of the fields populate and appear modifiable (you can change the values in them). However, the Drupal docs say #value is not modifiable... and that's true because when submitted they are set to their original values and anything the user changed is lost.

So... how can I get the values to populate properly?

Thanks for any help you can provide.

Jeff


More information about the development mailing list