I have 3 fields. On blur on any of them I want to look for empty ones - if blurred one has value and any of the others does not, I want to copy value.
Obtaining value is easy, simply
$form_state['triggering_element']['#value'], but setting it elsewhere gets tricky.
$form['item']['#default_value'] does not work if field is empty after user's edit. Changing
$form['item']['#value'] makes Drupal ignore any further user input. Changing
$form_state['values'] seems to do nothing. What is the correct approach that should work? When I'll know that, I'll be able to debug.