Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个实体引用字段作为选择列表。如果选定的用户可以将文本添加到文本字段,我该如何添加其他选项?我正在使用 Drupal 7。
谢谢,
1.在您创建节点表单时添加名为“其他”的新文本字段并默认隐藏(表单更改前缀和后缀带有“隐藏”类的div)
2.对该内容类型进行表单更改-通过在名为“其他”的数组中添加新项目来更改引用的字段选项。
3.如果用户通过删除“隐藏”类在下拉列表中选择“其他”,则使用 AJAX 显示新创建的字段。