1

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!

piet.t
  • 11,718
  • 21
  • 43
  • 52

3 Answers3

2

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
  • 2,886
  • 1
  • 22
  • 36
1
%input {type="radio" name="Relocation" checked="checked" value="TrueOrWhatever"}

OR just use HtmlHelper

Dmytrii Nagirniak
  • 23,696
  • 13
  • 75
  • 130
1

NHaml 2.0 Beta 1 syntax

%input{type="radio", name="Relocation", checked="true"}
Simon
  • 33,714
  • 21
  • 133
  • 202