Drupal节点表单定制
我有一个节点类型“评论”,它附加到两个词汇表,并以节点形式出现在名为 VOCABULARIES 的字段集中。但我不希望它们出现在字段集中。我在模块中使用该功能,并且还增加了模块重量,但到目前为止还没有成功。谁能告诉我我在这里做错了什么..?
<?php
function mymodule_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'review_node_form') {
$form['taxonomy'][2]['#collapsible'] = FALSE;
$form['taxonomy'][3]['#collapsible'] = FALSE;
}
}
?>
I have a node type 'review' which is attached to two vocabularies and are appearing in a fieldset named VOCABULARIES in the node form. But what i don't want them to be in a fieldset. I am using the function in a module and have also increased the module weight but no success till now. Can any one tell me what i am doing wrong here..?
<?php
function mymodule_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'review_node_form') {
$form['taxonomy'][2]['#collapsible'] = FALSE;
$form['taxonomy'][3]['#collapsible'] = FALSE;
}
}
?>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IIRC,“分类”条目本身就是字段集,因此您可以尝试:
请注意,这只会使字段集扩展且不可折叠,但不会删除它。
IIRC, the 'taxonomy' entry itself is the fieldset, so you might try:
Note that this would only make the fieldset expanded and non collapsible, but not remove it.