Twitter bootstrap YesSOD中的引导单选按钮:如何获取值?

Twitter bootstrap YesSOD中的引导单选按钮:如何获取值?,twitter-bootstrap,radio-button,yesod,Twitter Bootstrap,Radio Button,Yesod,我试图从Yesod中的引导值中获取单选按钮的值。这是我的在线收音机: <form .form-horizontal ... <label .radio-inline> <input type=radio name=gender checked>_{MsgMale} <label .radio-inline> <input type=r

我试图从Yesod中的引导值中获取单选按钮的值。这是我的在线收音机:

<form .form-horizontal
    ...
    <label .radio-inline>
        <input type=radio
               name=gender
               checked>_{MsgMale}
    <label .radio-inline>
        <input type=radio
               name=gender>_{MsgFemale}
但是
gender
总是
True

我曾尝试为
输入
使用
属性,但在这种情况下,我得到了一个错误
无效的布尔值

我读过:

但我不明白。在这种情况下,“标记”是什么意思

请帮助我。

我找到了解决方案:

<form .form-horizontal
    ...
    <label .radio-inline>
        <input type=radio
               name=gender
               value=on                 <<< exactly `on` 
               checked>_{MsgMale}
    <label .radio-inline>
        <input type=radio
               value=no                 <<< exactly `no`
               name=gender>_{MsgFemale}

标记的意思是“单选按钮旁边有一个小的用户描述”好的,但是我如何提取男/女按钮的值呢?我认为使用布尔值表示性别有点奇怪。我可能会将
selectFieldList
radioFieldList
数据性别=男性|女性
或其他东西一起使用。
If this field is required, the first radio button is labeled "Yes" and the second "No". 
<form .form-horizontal
    ...
    <label .radio-inline>
        <input type=radio
               name=gender
               value=on                 <<< exactly `on` 
               checked>_{MsgMale}
    <label .radio-inline>
        <input type=radio
               value=no                 <<< exactly `no`
               name=gender>_{MsgFemale}