Skip to content

Checkbox toggle issue #233

Description

@aleswita

Version: 3.0.1

Bug Description

When checkbox marked as required, condition with toggle evaluated always to true and JS hide HTML attribute with ID data every time, if checkbox checked or not.
If commented setRequired, behaviour is OK.

Steps To Reproduce

protected function createComponentForm(): Nette\Application\UI\Form
{
	$form = new Nette\Application\UI\Form();

	$form->addCheckbox('checkbox', 'checkbox')
		->setOmitted()
		->setRequired()
		->addCondition(Nette\Forms\Form::EQUAL, false)
			->toggle('data')
		->endCondition();

	return $form;
}
{form form}
	<div id="data">
		...
	</div>

	{input checkbox}
{/form}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions