views:

181

answers:

3

Does anyone know the correct syntax for a selected radio button in NHAML?

This is my current NHAML code: %input{type="radio", name="Relocation", value="Yes"}

The help would be greatly appreciated.

Thanks!

+1  A: 

NHaml 2.0 Beta 1 syntax

%input{type="radio", name="Relocation", checked="true"}
Simon
+2  A: 

The latest version of NHaml (2.0 Beta 2) changes the way it handles attributes. Don't use commas:

%input{type="radio" name="Relocation" value="Yes"}
Gabriel Florit
+1  A: 

%input {type="radio" name="Relocation" checked="checked" value="TrueOrWhatever"}

OR just use HtmlHelper

Dmytrii Nagirniak
it's the checked that does the trick
borisCallens