Skip to content

nattreid/select-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SelectBox pro Nette Framework

Použití

protected function createComponentSelectBox() 
{
    $control = new NAttreid\SelectBox\SelectBox;
    $control->setTranslator($this->translator);
    $control->column = 'column';
    $control->name = 'columnName';
    $control->rows = [];
    return $control;
}

protected function createComponentForm()
{
    $form = new \Nette\Forms\Form;
    $form->addHidden('column', $this->defaultValue);
    // dalsi php kod
    return $form;
}

a vložíme do latte

{control selectBox, column => 'nazevPolozkyFormulare', name => 'nazev', rows => $data, $first => 'nazev'}