21 Jul
2011
21 Jul
'11
8:31 a.m.
Hi all, I'm trying to include a form from a module trought a ajax callback on D7 [1]. Actually I got a button #ajax-ed which load the form in a wrapper on the page. The form is altered in callback to make it ajax enabled, specifing #ajax settings plus custom #submit & #validate callback. The form loads correctly, but, when submitting, it post the whole page to /system/ajax, on a blank page (or without ajax it post to the correct path but not triggering the custom #submit). I've tryed both drupal_get_form and drupal_build_form with custom form_state settings (eg. no_cache, rebuild) to skip/force rebuild of form (and cache). Thanks in advance, Luca [1] http://drupal.org/node/1218474#comment-4744608