Skip to content
This repository was archived by the owner on Aug 12, 2019. It is now read-only.
This repository was archived by the owner on Aug 12, 2019. It is now read-only.

Undefined variable: _form #51

Description

@khorsky

Při aktualizaci jednoho staršího projektu na Nette 2.4 jsem narazil s vlastními komponentami, založenými na Nextras\Forms\ComponentControl.

Zjednodušený kód:

class PublishingControl extends ComponentControl
{
	public function __construct($caption = NULL)
	{
		parent::__construct($caption);
		$this['draft'] = new Checkbox('Uložit draft, zatím nepublikovat');
		$this['datePublish'] = new DatePicker('Datum zveřejnění');
	}
}

šablona:

<div class="form-group">
	<div class="checkbox">
		{input draft}
	</div>
</div>
<div id="{$toggleId}" class="form-group">
	{label datePublish class => "control-label" /}
	{input datePublish}
</div>

Nevím, zda tohle nějak nesouvisí s #49 . Pokud změním $_form na $form, změní se i hláška na "undefined variable: form".

"nextras/forms": "^2.0.1",
"nette/forms": "^2.4.6",
"latte/latte": "^2.4.6",

V configu:
extensions:
nextras.form: Nextras\Forms\Bridges\NetteDI\FormsExtension

latte:
macros:
- Nextras\Forms\Bridges\Latte\Macros\BS3InputMacros

Pokud vypnu BS3InputMacros, nic se nezmění. Pokud neaktivuju rozšíření nextras, dostanu end() expects parameter 1 to be array, null given

Verze 1.6.2 ve spojení s 2.3.x Nette fungovala podle očekávání.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions