function test($form, &$form_state){ $form = array(); $header = array(.............); $values = array(.............); $form['table'] = array( '#type' => 'tableselect', '#header' => $header, '#options' => $rows, '#multiple' => $IsCheckbox, '#empty' => t('No users found'), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Submit'), ); return $form; } // end of function test() function test_submit($form, &$form_state){ $selected = $form_state['values']['table']; drupal_set_message($selected) // displays array index (0,1,2 etc) return; }
How to get the selected table row values in Drupal form. Need assistance on the issue. Any help would be appreciated.