<?
class frmMultiText4 extends MForm
{

    public function __construct()
    {   
        global $page;

//var_dump($_REQUEST);
        parent::__construct('Exemplo MultiTextField4');
        $options_arr1 = array('op1'=>'OpÃ§Ã£o1','op2'=>'OpÃ§Ã£o2','op3'=>'OpÃ§Ã£o3','op4'=>'OpÃ§Ã£o4','op5'=>'OpÃ§Ã£o5');
        $options_arr2 = array('op1','op2','op3','op4','op5');
        $f = array(array('id','label','nome'));
        $lkp = new MLookupTextField('lkpAluno','','Aluno',25);
 	    $lkp->baseModule = 'example';
        $lkp->module = 'example';
	    $lkp->item = 'aluno';
	    $lkp->event = 'filler';
	    $lkp->related = 'none,lkpAluno';
        $f1 = array(
              new MTextField('txfId','','Texto',20),
              $lkp,
              new MSelection('selIdSistema','','Sistema',$options_arr1)
        );
        $fields = array( 
             new MMultiTextField4('mt2',null,'Exemplo - layout horizontal:',$f1,200,true,'horizontal'),
        );
        $this->setFields($fields);
        $this->setFieldAttr('mt2','info','This is the info attribute');
        $this->setFieldAttr('mt2','fieldWidth',240);
        $this->mt2->setListTitle(array('Texto:80','Aluno:80','Sistema:'));

        $buttons = Array(
           new MButton('btnPost', 'Enviar'),
        );
        $this->setButtons($buttons);
        if ( $page->isPostBack() )
        {
           $this->eventHandler();
        }
    }

    public function btnPost_click()
    {
       $value = $this->mt2->getCodeValue();
       $this->addField(new MTableRaw('Campo mt2',$value));
    }

}

?>
