Attach an #ajax callback to a field when the form is reloading from previous ajax request
#attached Will not be processed properly on elements that was loaded with AJAX. Maybe it could, but it never worked for me. on the other hand, using #ajax worked for me without a fault. what I would try (obviously a guess because you didn't provide full SSCCE) would be:

$field['#ajax'] =&gt; array(
  'wrapper' =&gt; 'module_form',
  'callback' =&gt; 'module_form_ajax_callback',
  'event' =&gt; 'change',
);


If this element is created with an AJAX call from another element, it's AJAX will work.