Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/288.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.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
Php 如何为小部件:entityreference视图小部件中的项目添加移除按钮?_Php_Drupal_Hook_Drupal Modules_Drupal Views - Fatal编程技术网

Php 如何为小部件:entityreference视图小部件中的项目添加移除按钮?

Php 如何为小部件:entityreference视图小部件中的项目添加移除按钮?,php,drupal,hook,drupal-modules,drupal-views,Php,Drupal,Hook,Drupal Modules,Drupal Views,我安装了entityreference\u view\u小部件,为实体引用创建了一个视图,然后创建了一个字段entityreference视图 但我现在想自定义我的小部件entityreference视图,我想为每个添加的项目添加一个删除按钮 如何为Renty参考视图字段的小部件中的每个项目添加“删除”按钮? 有这样做的模块还是php代码?帮助我plz我使用一些jQuery在一个项目上成功地做到了这一点 取消选中某行的复选框而不是保存节点会删除该行,因此: 通过CSS隐藏复选框 使用jQue

我安装了entityreference\u view\u小部件,为实体引用创建了一个视图,然后创建了一个字段entityreference视图

但我现在想自定义我的小部件entityreference视图,我想为每个添加的项目添加一个删除按钮

如何为Renty参考视图字段的小部件中的每个项目添加“删除”按钮?
有这样做的模块还是php代码?帮助我plz

我使用一些jQuery在一个项目上成功地做到了这一点

取消选中某行的复选框而不是保存节点会删除该行,因此:

  • 通过CSS隐藏复选框
  • 使用jQuery.each()为每一行添加一个删除按钮、链接等
  • 单击按钮时,只需取消选中该行的复选框,然后隐藏该行