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' => array(
'#type' => 'textfield',
'#title' => t('Destination Data Element'),
'#description' => t('Some text.'),
'#ajax' => array(
'event'=>'change',
'wrapper' => 'linked_form_elements',
'callback' => 'form_editor_linked_form_ajax',
),
),
);