1 form_test.module | form_test_disabled_tabledrag_row($form, &$form_state) |
Menu callback for testing disabled tabledrag rows.
File
- core/
modules/ simpletest/ tests/ form_test.module, line 2710 - Helper module for the Form API tests.
Code
function form_test_disabled_tabledrag_row($form, &$form_state) {
$options = array(
1 => array(
'title' => 'How to Learn Backdrop',
'content_type' => 'Post',
'status' => 'published',
),
3 => array(
'title' => 'Privacy Policy',
'content_type' => 'Page',
'status' => 'published',
),
5 => array(
'title' => 'Disabled row',
'content_type' => 'Page',
'status' => 'published',
'#disabled' => TRUE,
),
);
$header = array(
'title' => t('Title'),
'content_type' => t('Content type'),
'status' => t('Status'),
);
$form['tabledrag_test'] = array(
'#type' => 'tableselect',
'#options' => $options,
'#header' => $header,
);
$form['actions'] = array(
'#type' => 'actions',
'submit' => array(
'#type' => 'submit',
'#value' => 'Submit',
),
);
return $form;
}