bjverde / formDin5

:elephant: Next formDin FrameWork version. Current version link https://github.com/bjverde/formDin
GNU General Public License v3.0
6 stars 4 forks source link

addGroupField with Like TFrame #97

Open bjverde opened 4 years ago

bjverde commented 4 years ago

Está relacionado com #75

image

        $frm = new TFormDin('Exemplo de Grupos');
        $frm->addGroupField('gpx1', 'Teste Novo Grupo 1');
        //$frm->addGroupField('gpx1', 'Teste Novo Grupo 1')->setLabelsAlign('center');
            $frm->addTextField('nome1', 'Nome 1:', 40, true);
            $frm->addTextField('nome2', 'Nome 2:', 40, true);
            $frm->addTextField('nome3', 'Nome 3:', 40, true);
            //$frm->addButton('Gravar', null, 'btnGravar', 'alert(0)', null, true, false)->setAttribute('align', 'left');
        $frm->closeGroup();

        // O Adianti permite a Internacionalização - A função _t('string') serve
        //para traduzir termos no sistema. Veja ApplicationTranslator escrevendo
        //primeiro em ingles e depois traduzindo
        $frm->setAction(_t('Save'),'onSave',$this,null,'far:check-circle','green');
        $frm->setActionLink(_t('Clear'),'clear',$this,null,'fa:eraser','red');
        $this->form = $frm->show();

        $subform = new BootstrapFormBuilder;

        // creates a frame
        $frame = new TFrame;
        $frame->oid = 'frame-measures';
        $frame->setLegend('Measures');
        $frame->add( $subform );

        $subform->addFields([new TLabel('Net Weight:')], [new TEntry('field1')]);

        // wrap the page content using vertical box
        //$vboxFrame = new TVBox;
        //$vboxFrame->style = 'width: 100%';
        //$vboxFrame->add($frame);
        //$vboxFrame->add( [new TLabel('Net Weight:')], [new TEntry('field1')]);

        $this->form->addContent([$frame]);
bjverde commented 4 years ago

Ver AccordionView para fazer abrir e fechar

https://www.adianti.com.br/framework_files/tutor/index.php?class=AccordionView

bjverde commented 4 years ago

Ver tambem ContainerFrameView para fazer o abrir e fechar

https://www.adianti.com.br/framework_files/tutor/index.php?class=ContainerFrameView