forms icon indicating copy to clipboard operation
forms copied to clipboard

Render groups problems

Open aleswita opened this issue 7 years ago • 3 comments

  • 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;
}

aleswita avatar Jun 21 '17 04:06 aleswita

Seems this is related to #199

mabar avatar Mar 18 '19 16:03 mabar

Hi, we bumped into this issue. I am just pinging ticket so it doesn't get closed because of inactivity.

markoph avatar Aug 21 '23 11:08 markoph

Groups really do behave this way and there is nothing we can do about it on principle.

dg avatar Oct 05 '23 02:10 dg