π | Drupal core | Double click prevention on form submission ignoring callback in forms with multiple submit buttons
According to me. you can do like this as well.
<?php
function mymodule_custom_form($form, &$form_state) {
$form['submit_calback_a']['1'] = array(
'#type' => 'submit',
'#value' => 'calback_a',
'#attributes' => array(
'class' => array('btn-link'),
'title' => t('calback_a'),
),
);
$form['submit_calback_b']['1'] = array(
'#type' => 'submit',
'#value' => 'calback_b',
'#attributes' => array(
'class' => array('btn-link'),
'title' => t('calback_b'),
),
);
$form['submit_calback_c']['1'] = array(
'#type' => 'submit',
'#value' => 'calback_c',
'#attributes' => array(
'class' => array('btn-link'),
'title' => t('calback_c'),
),
);
}
function mymodule_custom_form_submit($form, &$form_state) {
$values = $form_state['values'];
if ($values['op'] == t('calback_a')) {
calback_a();
}
if ($values['op'] == t('calback_b')) {
calback_b();
}
if ($values['op'] == t('calback_c')) {
calback_c();
}
}
π | Drupal core | Double click prevention on form submission ignoring callback in forms with multiple submit buttons
vaibhav340 β made their first commit to this issueβs fork.
π | Node.js integration | WebSocket connection to 'wss://example.com:8080/socket.io/?EIO=3&transport=websocket&sid=DM3ekVc-P9KelcIoAAE1' failed: WebSocket is closed before the connection is established
π | Node.js integration | WebSocket connection to 'wss://example.com:8080/socket.io/?EIO=3&transport=websocket&sid=DM3ekVc-P9KelcIoAAE1' failed: WebSocket is closed before the connection is established
π | Node.js integration | WebSocket connection to 'wss://example.com:8080/socket.io/?EIO=3&transport=websocket&sid=DM3ekVc-P9KelcIoAAE1' failed: WebSocket is closed before the connection is established
π | Node.js integration | WebSocket connection to 'wss://example.com:8080/socket.io/?EIO=3&transport=websocket&sid=DM3ekVc-P9KelcIoAAE1' failed: WebSocket is closed before the connection is established
In Drupal 7.98 upgrade there is change in method of storing session ids in "sessions" table. New function "drupal_session_id" is introduced to get drupal session ids. While generating a authToken in NodeJs module need to use new method to get drupal session id. I have applied patch for it and that works for me.
thanks