n:name latte notation for checkboxes
Notice: This thread is very old.
- duke
- Member | 650
In current dev-master following latte notation doesn't work for checkboxes:
<input n:name="remember" />
It simply generates mere “<input>
”, which is caused by
calling method Html::attributes()
, which in this case returns an
empty string (because the Html object contains a label-input pair rather than a
single input).
It was probably introduced by this commit.
- duke
- Member | 650
So in other words, you are saying that I should use:
<input n:name="remember:" />
… which works.
However when I am using n:name notation, it should be obvious to latte, that I merely want to connect the manually written input tag with the form, so IMHO colon shouldn't be necessary here.
And it definitely shouldn't produce empty input tag.
- David Grudl
- Nette Core | 8082
This is a problem which I am aware. n:name
should always use
partial rendering. There are three solutions:
- used method_exists(‘getControlPart’) in FormMacros.php (maybe quick workaround for 2.1.1)
- add interface for partial rendering
- add partial rendering directly to BaseControl