0

添加显示组 1:

$this->addDisplayGroup(DATEFROM,ELEM_DATETO),
                      'Date', array('order'  => 4,
                                'decorators' => array('FormElements',

        array(array('openinnerdiv' => 'HtmlTag'),
              array('tag' => 'div', 'id'=>'date_to_from','name'=>'date_to_from','class'=>'date_to_from')),

         array(array('opendiv' => 'HtmlTag'),
         array('tag' => 'div','id'=>'date' ))                                       
             ),
        )
    );

添加显示组 2:

$this->addDisplayGroup(array('AddBlock','Add','AddDate','ORDERID','COUNTRYCODE','DATEFROM','DATETO','AGE','GENDER','LIST','CAMERA'),
              'queryblockfld_1',array('order'    => 4,
                'decorators' => array('FormElements',

                array(array('openinnerdiv' => 'HtmlTag'),
                      array('tag' => 'div', 'id'=>'queryblockfld_1','name'=>'queryblockfld','class'=>'queryblockfld')),

                array(array('opendiv' => 'HtmlTag'),
                      array('tag' => 'div','id'=>'queryblock' ))

                                                                ), 
                                            )
                        ); 

我想添加 addDisplayGroup1addDisplayGroup 2. 任何人都可以帮助我吗?

4

1 回答 1

0

经过对 Web 的长期研究,我找到了自己问题的答案:

$this->addDisplayGroup(array('DATEFROM','DATETO'),
                                       'contact',array('legend' => 'Contact Information'));

$from_to = $this->getDisplayGroup('contact');
$from_to->setDecorators(array('FormElements',
  array(array('openinnerdiv' => 'HtmlTag'),
  array('tag' => 'div', 'id'=>'date_1','name'=>'date_1','class'=>'date_1','openOnly'=>true)),
  array(array('opendiv6' => 'HtmlTag'),
  array('tag' => 'div','id'=>'blockfld_1','class'=>'blockfld','openOnly'=>true)),
  array(array('opendiv' => 'HtmlTag'),
  array('tag' => 'div','id'=>'block','openOnly'=>true)),                                                                        
));


$this->addDisplayGroup(array('AddBlock','Add','AddDate','NUMBERPLATE','COUNTRYCODE','NODE','CAMERA','NODELIST','NODECAMERA'),
       'pass',array('legend' => 'Password')); 

$pass = $this->getDisplayGroup('pass');
 $pass->setDecorators(array(
        'FormElements',
         array('HtmlTag',array('tag'=>'div','closeOnly'=>true))
));

我刚刚修改了答案,所以会有一些小错误,请纠正它。

于 2013-05-29T16:48:16.617 回答