The attached patch lets hook_form_alter effect ajaxloader loaded forms.

While it works fine, I'm a little apprehensive about calling "foreach (module_implements('form_alter') as $module)" outside the normal form builder and I'm curious if there may be a better way to load these forms.

That being said this does work, and I'd be happy to see it in the module.

CommentFileSizeAuthor
ajaxloader_formalter.patch820 bytesjmiccolis

Comments

arthurf’s picture

My original intent here was to add new form elements on the fly. What I think is the more proper way to do things is to really call the drupal_get_form() to get a full fledged form. What I'd like to do is have an option for a form element (what exists currently) and then a full form via a different URL. Would that work for you?

jmiccolis’s picture

Yea, I think that makes better sense as well. Using this for full form is a little unwieldy, and I had to do some things in javascript that could be more properly done on the server - like define a target for the form.