$form('elements') ('#ajax') =array(
"callback" => (first_callback,second_callback),
"event" => "change",
"effect" => "fade",
);
function first_callback(array &$form, FormStateInterface $form_state) {
return action;
}
function second_callback(array &$form, FormStateInterface $form_state){
return second_action;
}
How to callback more than one function in the above example.
I have two conditions and from one callback or two callback, I want to change both of them value.
1.alter text value (text_1)
2. alter next text value (text_2)
The problem is only one callback is working.
I use this method also
$form('elements') ('#ajax') =array(
"callback" ="callback_me"),
"event" => "change",
"effect" => "fade",
);
function callback_me(array &$form, FormStateInterface $form_state) {
return array($one_conditon_text_1,$two_condition_text_2);
}
But it’s doesn’t work.