Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html “引导”;“多重”;简单形式的属性_Html_Ruby On Rails_Twitter Bootstrap_Simple Form - Fatal编程技术网

Html “引导”;“多重”;简单形式的属性

Html “引导”;“多重”;简单形式的属性,html,ruby-on-rails,twitter-bootstrap,simple-form,Html,Ruby On Rails,Twitter Bootstrap,Simple Form,我希望有一个向下滚动的菜单,可以从使用引导功能中选择不同的选项,如下所示: 1. 2. 3. 4. 5. 我目前正在使用simple_form构建我的菜单(默认为下拉菜单): 哪些输出本身: <div class="form-group select required form_member_type"><label class="select required control-label" for="form_member_type"><abbr titl

我希望有一个向下滚动的菜单,可以从使用引导功能中选择不同的选项,如下所示:


1.
2.
3.
4.
5.
我目前正在使用simple_form构建我的菜单(默认为下拉菜单):


哪些输出本身:

<div class="form-group select required form_member_type"><label class="select required control-label" for="form_member_type"><abbr title="required">*</abbr> Member type</label><select class="select required form-control" name="form[member_type]" id="form_member_type"><option value=""></option>
<option value="Monthly member: $55">Monthly member: $55</option>
<option value="Pay-Per-Use (cash): 15% discount">Pay-Per-Use (cash): 15% discount</option>
<option value="Youth member: $35">Youth member: $35</option>
<option value="Monthly with children (Friday&#39;s): $55 + $16 per child">Monthly with children (Friday&#39;s): $55 + $16 per child</option>
<option value="Other - specify in notes">Other - specify in notes</option></select></div>
*成员类型
每月会员:55美元
每次使用支付(现金):15%折扣
青年成员:35美元
每月带孩子(周五和周五):每个孩子55美元+16美元
其他-在注释中指定

我需要以某种方式将
multiple
属性插入select标记中。有没有一种技术可以在不必手动编辑html代码的情况下使用嵌入式Ruby实现这一点?

只需将代码替换为以下行即可

<%= f.input :member_type, collection: Form::MEMBERSHIPS, include_blank: true, error: false,:input_html => {:multiple => true} %> 
{:multiple=>true}%>

希望我回答了您的问题。

只需将代码替换为以下行即可

<%= f.input :member_type, collection: Form::MEMBERSHIPS, include_blank: true, error: false,:input_html => {:multiple => true} %> 
{:multiple=>true}%>
希望我回答了你的问题

<%= f.input :member_type, collection: Form::MEMBERSHIPS, include_blank: true, error: false,:input_html => {:multiple => true} %>