drupal-7hook-form-alter

drupal alter node edit form


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


Solution

  • 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