forms
forms copied to clipboard
Render groups problems
- bug report? yes
- feature request? no
- version: 2.4.4
Description
Nette Forms have two rendering issues with using with groups
1. Can not place control to the specific position
Steps To Reproduce
Expected output (without groups):
protected function createComponentForm(): \Nette\Application\UI\Form {
$form = new \Nette\Application\UI\Form;
//$form->addGroup("group1");
$form->addText("input1", "input1");
$form->addText("input2", "input2");
$form->addSubmit("send1", "send1");
$form->addSubmit("send2", "send2");
$form->addComponent(new \Nette\Forms\Controls\TextInput("input3"), "input3", "send1");
return $form;
}
Invalid inputs position (with groups):
protected function createComponentForm(): \Nette\Application\UI\Form {
$form = new \Nette\Application\UI\Form;
$form->addGroup("group1");
$form->addText("input1", "input1");
$form->addText("input2", "input2");
$form->addSubmit("send1", "send1");
$form->addSubmit("send2", "send2");
$form->addComponent(new \Nette\Forms\Controls\TextInput("input3"), "input3", "send1");
return $form;
}
2. First control without group rendered on the end of form
Steps To Reproduce
protected function createComponentForm(): \Nette\Application\UI\Form {
$form = new \Nette\Application\UI\Form;
$form->addText("input1", "input1");
$form->addGroup("group1");
$form->addText("input2", "input2");
$form->addSubmit("send1", "send1");
$form->addSubmit("send2", "send2");
return $form;
}
Seems this is related to #199
Hi, we bumped into this issue. I am just pinging ticket so it doesn't get closed because of inactivity.
Groups really do behave this way and there is nothing we can do about it on principle.