macro {input} cannot modify class

Notice: This thread is very old.
DOBss
Member | 24
+
0
-

In the latest version of nette (2.1.1) there is no way to change the class of a checkbox input in the template. I tried both the {input name class => active} and {input name, class => active} too, nothing changed. The only way in this version was to do it from the presenter while creating the component.

$items->addCheckbox('active')->getControlPrototype()->class('active');

Please have a look.

PS – there is no problem with text, hidden and select inputs.

David Grudl
Nette Core | 8129
+
0
-

Checkboxes in 2.1 require colons after name: {input name: class => active}

DOBss
Member | 24
+
0
-

So this was why they were rendered as <label><input /></label> ant not just the input itself using the {input} marcro. Thanks for your reply, I was just a litle bit lazy – it was in the release not I just noticed… thanks again!