Can I use ajax to target multiple form elements from one input?
It appears that you can target different parts of a form using ajax commands, however you must choose to return only one of either:


HTML or
A renderable array or
An array of AJAX commands


In the situation I originally wrote about, I was trying to return both an array of AJAX commands and a renderable array, which doesn't seem possible.

Code in the examples module demonstrates targeting different parts of a form using an array of AJAX commands:

function ajax_example_advanced_commands_html_callback($form, $form_state) {
  $text = $form_state['values']['html_command_example'];

  $commands = array();
  $commands[] = ajax_command_html('#html_div', $text);
  $commands[] = ajax_command_replace("#html_status", "&lt;div id='html_status'&gt;Updated html_command_example with text=$text;  " . date('r') . "&lt;/div&gt;");
  return array('#type' =&gt; 'ajax', '#commands' =&gt; $commands);
}


In this code sample, #html_div is getting $text, and separately #html_status is getting "Updated html_command_example with text=$text;  " . date('r') . ""

Two different locations on a form with two different pieces of information from the one ajax callback!

Looking again at what I was working on, I realized that I didn't need to return the node title field at all. It will only be a utility field, used for sorting data in lists.

I have hidden the field on the node form and it is populated the second time my form is built when my original ajax callback is triggered.