视图不显示复选框,其中answer> 1 [英] Views doesn't show checkbox fields where answer > 1

查看:213
本文介绍了视图不显示复选框,其中answer> 1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Drupal和Views,扩展配置文件模块已激活。为了使用户能够检查多个感兴趣的领域,我还添加了一个名为个人资料复选框的模块。它增加了使用自由格式列表的能力,但将其复制到复选框或单选按钮。

I am using Drupal with Views and the extended profiles module activated. To enable users to check multiple areas of interest I also added a module called Profile Checkboxes. It adds the ability to use a free-form list but turns it into either check boxes or radio buttons.

此模块工作非常干净,没有出现错误。但是,如果用户检查多个兴趣,那么它们将以逗号分隔的值存储在 profile_values 表中。

This module works very cleanly and did not present errors. But if a user check multiple interests then those are stored in the profile_values table as a comma seperated value.

所以如果用户喜欢说汽车,卡车和自行车。这被存储在数据库的一个字段中:

So if the user likes lets say cars, trucks and bikes. That is stored in one field of the database as:

+-----+-----+---------------------+
| fid | uid | value               |
+-----+-----+---------------------+ 
| 12  | 32  | cars, trucks, bikes |
+-----+-----+---------------------+

我想能够让我的视图解析正确,以便我可以创建仅显示已经输入兴趣的用户的过滤器。它给我的选项是验证if ant列表中的值是否被选择,我选择了列表中的所有值。但它只显示检查其中一个值的用户。我希望这是有道理的。

I want to be able to have views parse this correctly for me so that I can create filters that only shows users who have entered an interest. The options it gives me is to validate "if ant of" the values in the list is chose, I selected all the values in the list. But it only shows the users who have check one of the values. I hope it makes sense.

我需要在自定义tpl文件中编写代码,还是可以使用Views ?

推荐答案

你可以用意见来做,但在这种情况下,做一个很简单它没有意见,除非你非常了解views API。

You can do it with views, but in this case it will probably be a lot simpler to do it without views, unless you know the views API very well.

这篇关于视图不显示复选框,其中answer> 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆