Extend the Scheduler module forms Hi i'm trying to extend scheduler module forms. The one i need is  included as fieldset in node as extra field refer to image


/**
 *  Implements hook_form_node_type_form_alter(). 
 */

 function nodequeue_scheduler_form_node_type_form_alter(&amp;$form, $form_state) {

    //This  node type configuration form with schedule options

    $form['scheduler']['nodequeue_sheduler'] = array(
      '#type' =&gt; 'fieldset',
      '#title' =&gt; t('Nodequeue Scheduler Settings'),
      '#collapsible' =&gt; FALSE,
      '#group' =&gt; 'scheduler',
      '#weight' =&gt; 10,
    );

   }

/**
 * Implements hook_form_FORM_ID_alter().
 */
function nodequeue_scheduler_form_scheduler_node_form_alter(&amp;$form, $form_state) {

   //feldset or vertical tab for scheduler to ammend
$options = array (1,2,3);
// Adding few custom fields
$form['scheduler_settings']['publish_nodequeue'] = array(
 '#type' =&gt; 'fieldset',
 '#title' =&gt; t('Nodequeue Scheduling settings'),

);
$form['scheduler_settings'] ['publish_nodequeue']['schedule_nodequeue'] = array(
 '#type' =&gt; 'checkbox',
 '#default_value' =&gt; 1,
 '#title' =&gt; t('Add to nodequeue when published')
);

$form['scheduler_settings']['publish_nodequeue']['nodequeue_position'] = array(
 '#type' =&gt; 'select',
 '#options' =&gt; $options,
 '#title' =&gt; t('Position')

);
$form['scheduler_settings']['publish_nodequeue']['publish_on'] = array(
 '#type' =&gt; 'textfield',
 '#title' =&gt; t('Publish on'),
 '#maxlength' =&gt; 30,

);
// function scheduler_mail_form_scheduler_node_form_alter(&amp;$form, $form_state) {
//    $email_enabled = variable_get('scheduler_mail_enable_' . $form['type']['#value'], 0);
//    if (!$email_enabled) {
//      return;
//    }

//    $node = $form['#node'];
//    $settings = _scheduler_mail_load($node);

//    $form['scheduler_settings']['scheduler_mail'] = array(
//      '#type' =&gt; 'fieldset',
//      '#title' =&gt; t('Email settings'),
//    );
//    $form['scheduler_settings']['scheduler_mail']['scheduler_mail_send'] = array(
//      '#type' =&gt; 'checkbox',
//      '#title' =&gt; t('Send an email notification when this node is (un)published'),
//      '#default_value' =&gt; $settings-&gt;send,
//    );
//    $form['scheduler_settings']['scheduler_mail']['scheduler_mail_address'] = array(
//      '#type' =&gt; 'textfield',
//      '#title' =&gt; t('Use this email address'),
//      '#description' =&gt; t('If left blank, email will go to the original author of this node'),
//      '#default_value' =&gt; $settings-&gt;address,
//      '#maxlength' =&gt; 255,
//      '#states' =&gt; array(
//        'visible' =&gt; array(
//          "input[name='scheduler_mail_send']" =&gt; array("checked" =&gt; true)
//        ),
//      ),
//    );
//    $form['#validate'][] = '_scheduler_mail_validate';
//    $form['#submit'][] = '_scheduler_mail_submit';
  }


I have found module scheduler mail and it alters the node type form and add some configuration fields as checkbox but not getting the form which is in node edit form . How do i do it in drupal 7
If scheduler is using hook_form_alter() on a form, and your module is also using hook_form_alter() on the same form, the order of execution of these two hook_form_alter() functions matters. Evidently, your module's hook_form_alter() is getting called before scheduler can add the new form elements you're trying to modify.

Drupal executes these hooks in order of module weight. If you do not set the module weight, then I believe they all default to the same value and hooks with the same weight will get called in alphabetical order (but this is not guaranteed).

To ensure that your module gets called after scheduler, you need to set your module's weight to be greater than the scheduler's module weight. This is how you do that in your module's install file:

/**
 * Implements hook_install().
 */
function my_module_install() {
  // Because we need to alter a form that is also altered by the scheduler
  // module, we need to ensure this module gets loaded AFTER the scheduler.
  $weight = db_query('SELECT weight FROM {system} WHERE name = :name', array(':name' =&gt; 'scheduler'))-&gt;fetchField();
  db_update('system')
    -&gt;fields(array(
      'weight' =&gt; $weight + 1
    ))
    -&gt;condition('name', 'my_module')
    -&gt;execute();
}