I have a form updating with AJAX on select element change. Easy so far. The problem is that I need to return the form & also an ajax command at the same time.
If I need the form, I just return the
$form array and if I need to return an ajax command I use
return array('#type' => 'ajax', '#commands' => $commands);. Both works just fine.
The problem is that I don't get it how to combine both of them in the same return object.
Any ideas how can I do that?