drupal alter node edit form

后端 未结 2 1422
深忆病人
深忆病人 2021-02-02 04:16

How can I add a custom configuration area to a node edit form just beneath the Authoring Information & Publishing Options section?

2条回答
  •  面向向阳花
    2021-02-02 04:47

    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,
            ),
        );
    

    enter image description here

    ps: the form is in hook_form_alter

提交回复
热议问题