Hi

Thanks for the module. I've modified it sightly so it is compatible with 5.x

Two changes:

Comment submitagain_form_node_type_form_alter function, as it has no effect in 5.x.

Modify submitagain_form_alter like this:

function submitagain_form_alter($form_id, &$form) {
  if (strpos($form_id, '_node_form') && !isset($form['nid']['#value'])) {
    if (variable_get('submitagain_'. $form['type']['#value'], false)) {
      $form['submit_again'] = array(
        '#type' => 'submit',
        '#value' => t('Save and create another'),
        '#weight' => 41,
        '#submit' => array('node_form_submit')
      );
      $form['#theme'] = 'submitagain_node_form';
    }
  }
  
  if (isset($form['identity']['type'])) {
    $form['submission']['submitagain'] = array (
      '#type' => 'checkbox',
      '#title' => t('Submit Again?'),
      '#default_value' => variable_get('submitagain_' . $form['#node_type']->type, false),
      '#description' => t('Enable this checkbox if you want to provide a "Save and create another" button for your users.')
    );
  }
}

Hope it helps!!!

Comments

deekayen’s picture

Status: Active » Postponed (maintainer needs more info)

It looks like you backported 6.x, but there is already a 5.x. Does that mean 5.x isn't working for you?

pcambra’s picture

Yeah, now there is a 5.x but when i posted my issue a month and half ago, there wasn't

Is CCK issue fixed? (cck custom fields weren't submited, are they now?)
Thanks

pcambra’s picture

Hi!

5.x version is CCK compatible, tested!

Thanks!!!

deekayen’s picture

Status: Postponed (maintainer needs more info) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.