Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Build marquee_tableselect_test form.
- *
- * @param array $form_state
- * @return array The created form.
- */
- function marquee_tableselect_test($form_state) {
- $form = array();
- $form['test1'] = array(
- '#type' => 'textfield',
- '#title' => 'Teszt van ocsem',
- );
- $form['test2'] = array(
- '#type' => 'weight',
- '#title' => 'Súlyvane',
- '#delta' => 20,
- );
- $header = array(
- 'Ez is',
- 'Az is',
- );
- $options = array();
- $options['kula'] = array(
- 0 => 'Ez itt szöveg',
- 1 => array(
- 'data' => array(
- '#type' => 'textfield',
- '#title' => 'Válasszad',
- '#attributes' => array(
- 'class' => array('weight-class'),
- ),
- ),
- ),
- '#attributes' => array ('class' => array('draggable')),
- );
- $options['mokka'] = array(
- 0 => array(
- 'data' => array(
- '#type' => 'link',
- '#title' => 'Linkeklek gecc!',
- '#href' => 'user',
- '#options' => array(
- 'attributes' => array('class' => 'class1 class2 eziclass'),
- ),
- ),
- ),
- 1 => array(
- 'data' => array(
- '#type' => 'textfield',
- '#title' => 'Válasszad',
- '#attributes' => array(
- 'class' => array('weight-class'),
- ),
- ),
- ),
- '#attributes' => array ('class' => array('draggable')),
- );
- $form['tableselect_test'] = array(
- '#type' => 'tableselect',
- '#header' => $header,
- '#options' => $options,
- '#empty' => 'Nincs semmi öcsém',
- '#js_select' => FALSE,
- '#default_value' => array(
- 'kula' => 1,
- ),
- '#attributes' => array(
- 'id' => 'drag-and-dropolja',
- )
- );
- drupal_add_tabledrag('drag-and-dropolja', 'order', 'sibling', 'weight-class');
- return $form;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement