[development] AHAH with fieldsets not rebuilding correctly

Jeff Hartman lists at jeffhartman.com
Sat Feb 19 15:00:13 UTC 2011


On Feb 19, 2011, at 12:42 AM, Randy Fay wrote:

> The Examples project has a complete dependent dropdown example in the AHAH Example.  If I were you I would copy it and adapt it. http://drupal.org/project/examples
> 
> -Randy
> 
> On Fri, Feb 18, 2011 at 11:05 PM, Jeff Hartman <lists at jeffhartman.com> wrote:
>> Hey list,
>> 
>> I've got a couple forms that use AHAH functions to generate a drop down of states/provinces based on the user's selection in a country drop down menu.
>> 
>> I'm using a very similar method as is found here:
>>        http://drupal.org/node/331941
>> 
>> One form works fine with fields as $form['country'] and $form['state']. The other form uses fieldsets and those fields get renamed and lose their hierarchy after the form is rebuilt.

Randy,

Getting ahah to work in general is not the problem. I have it working on one form as I mentioned. The problem form has the values within a fieldset and the fields with updated data are generating new fields instead of replacing the existing values. It may not be the fieldset that is the problem, but I'm supposing it is because that's the main difference between the forms.

Jeff


More information about the development mailing list