Account created on 3 December 2019, almost 5 years ago
#

Recent comments

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();
  }
}

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

Production build 0.71.5 2024