开发者

Rails form check_box_tag parameter passing in array

I am using check_box_tag in my forms with jquery-mobile stylesheeting. My form_tag with check_box_tag works without jquery-mobile, but when I start using the jquery-mobile css and javascript, check_box_tag only allows me to check one op开发者_如何学Pythontion. Here is the code:

<%= form_tag(posts_path, :multipart => true) do %>

<div data-role="fieldcontain">
    <fieldset data-role="controlgroup">
        <legend>Choose terms:</legend>
        <%= check_box_tag name= "agreement[]", value=1, checked = false, :id => "checkbox-1" %>
        <label for="checkbox-1">I agree</label>
        <%= check_box_tag name= "agreement[]", value=2, checked = false, :id => "checkbox-2" %>
        <label for="checkbox-2">I agree without preconditions</label>
    </fieldset>
</div>

Why can't I select both checkboxes in the UI when jquery-mobile css and javascript is in use? How do I pass an array of parameters to Rails server?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜