AJAX callback function has to be defined in the same file? I have defined a textfield that includes an AJAX callback. In another separate file, I have the AJAX callback function defined.  

Will this work or does the callback function need to appear in the same file the textfield was defined in?

This is the code I would use.

'associated_element' =&gt; array(
  '#type' =&gt; 'textfield',
  '#title' =&gt; t('Destination Data Element'),
  '#description' =&gt; t('Some text.'),
  '#ajax' =&gt; array(
      'event'=&gt;'change',
      'wrapper' =&gt; 'linked_form_elements',
      'callback' =&gt; 'form_editor_linked_form_ajax',
    ),
  ),
);
use form_load_include() in your form definition function. I put this just above the return $form; line.

form_load_include($form_state, 'file_extension', 'your_module', 'your_file_name_without_extension');