-
-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Description
protected function createComponentTestForm()
{
$form = new Nette\Application\UI\Form();
$form->addGroup();
$form->addText('field', 'Visible field')->setRequired('Fill %label');
$form->addRadioList('switch', NULL, array('hide' => 'Hide', 'show' => 'Show'))
->setDefaultValue('hide')
->addCondition(\Nette\Application\UI\Form::EQUAL, 'show')
->toggle('show-container');
$form->addGroup()->setOption('container', \Nette\Utils\Html::el('div')->id('show-container'));
$form->addText('hiddenField', 'Hidden field')
->addConditionOn($form['switch'], \Nette\Application\UI\Form::EQUAL, 'show')
->setRequired('Fill %label');
$form->addGroup();
$form->addSubmit('send', 'Add');
return $form;
}
show-container is properly hidden at the start, but is not visible when second radio is selected.
Javascript validation on hiddenField also not working.
In Firefox and Chrome everything works as expected.
Metadata
Metadata
Assignees
Labels
No labels