Bir tablo olarak bir formu işlemek için nasıl

0 Cevap php

Ben aşağıdaki yapıya sahiptir bir form oluşturduk

function myfunction(){

      $form['myform']['row1']['field1'] = array(
        //type, title, etc.
      ); 
      $form['myform']['row1']['field2'] = array(
        //type, title, etc.
      ); 
      $form['myform']['row1']['field3'] = array(
        //type, title, etc.
      ); 


      $form['myform']['row2']['field1'] = array(
        //type, title, etc.
      ); 
      $form['myform']['row2']['field2'] = array(
        //type, title, etc.
      ); 
      $form['myform']['row2']['field3'] = array(
        //type, title, etc.
      ); 
}

ama ben bir baş arkaya mümkünse aşağıdaki biçimde bir tablo olarak işlemek istiyorum.

                       Col 1              Col 2                Col 3
----------------------------------------------------------------------           
Row 1                  Field 1            Field 2              Field 3
Row 2                  Field 1            Field 2              Field 3
Row 3                  Field 1            Field 2              Field 3

Ben bir tablo olarak formu işlemek için Drupal almak için ne biçim takip etmelidir?

P.S. Col 1 = select, Col 2 = checkbox, Col 3 = texfield ve ilk sütun row # Row1, Row2, Row3 olduğunu.

Edit: doesn't drupal have something that you could give it a form and it will automatically produce that colored row, white row look?

0 Cevap