本文介绍了drupal alter node编辑表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将自定义配置区域添加到创作信息& 发布选项部分?
解决方案
以下代码生成附件中的最后一个菜单: (
'#type'=>'fieldset',
'#access'=> TRUE,
'#title'=>'Barclays ePDQ',
'#collapsible'=> TRUE,
'#collapsed'=> TRUE,
'#group'=>'additional_settings',
'#weight'=> 100,
'barclays_epdq_active'=>数组(
' =>'checkbox',
'#title'=>'启用此Webform将用户发送到您的Barclays ePDQ商店进行付款',
'#default_value'=> $ active_state,
),
);
ps:表单处于hook_form_alter
How can I add a custom configuration area to a node edit form just beneath the Authoring Information & Publishing Options section?
解决方案
The follow code generates the last menu in the attached image:
$form['barclays_epdq'] = array(
'#type' => 'fieldset',
'#access' => TRUE,
'#title' => 'Barclays ePDQ',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'additional_settings',
'#weight' => 100,
'barclays_epdq_active' => array(
'#type' => 'checkbox',
'#title' => 'Enable this webform to send users to your Barclays ePDQ store to make a payment',
'#default_value' => $active_state,
),
);
ps: the form is in hook_form_alter
这篇关于drupal alter node编辑表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!