How to change label/control order for Radio/Checkbox form elements?

Notice: This thread is very old.
MagNet
Member | 1
+
0
-

Hi,
I would like to use CSS styling on a radio selection element in a form to make the radios look like this:
http://viralpatel.net/…-background/

The problem is however that nette renders HTML for radios like this:

<label for = "...">
	<input ...>
</label>

Therefore, I cannot use a CSS selector to style the label based on the input state (checked, unchecked) as CSS doesn't go back…

So the order I need is this:

<input ...>
<label for = "...">

Is this doable somehow? Thanks.

CZechBoY
Member | 3608
+
0
-

Still nobody?

Pavel Janda
Member | 977
+
0
-

You can always render the form manually:

<label n:name="my_input"></label>
<input n:name="my_input">
Pavel Kravčík
Member | 1195
+
+2
-

I belive you can force old way to render it by put : after input name.

{label checkbox:}
{input checkbox:}

I don't try it in new Nette version.