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'}