<?
class FrmMultiSelectionField extends MForm
{

    public function frmMultiSelectionField()
    {   
		global $page;

		parent::__construct('Exemplo MMultiSelectionField');
        $options_arr1 = Array('op1'=>'OpÃ§Ã£o1','op2'=>'OpÃ§Ã£o2','op3'=>'OpÃ§Ã£o3','op4'=>'OpÃ§Ã£o4','op5'=>'OpÃ§Ã£o5');
        $options_arr2 = Array(1=>'op1','op2','op3','op4','op5');
        $sel1 = new MSelection('sel1','','Selection 1',$options_arr1);
        $sel2 = new MSelection('sel2','','Selection 2',$options_arr2);
        $f = array($sel1, $sel2);
        $fields = array(
             new MMultiSelectionField('msf',null,'MMultiSelectionField',$f,200,true,'Info'),
			 new MText('mytext'),
		);
		$this->setFields($fields);
        $this->setFieldAttr('mytext','color','blue');
        $buttons = Array(
           new MButton('btnPost', 'Enviar'),
        );
	    $this->setButtons($buttons);
        if ( $page->isPostBack() )
		{
           $this->eventHandler();
		}
	}

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

?>
