During a node/add/

Imagine following
- Step 1
-- filliing title
-- filling body
- Step 2
-- filling the rest

When clicking on the "previous" button during Step 2, the text on the body in Step 1 isn't saved and dissapears while the title remains intact,
I've tried checking through the $form_state and #after_build without managing to find out where the problem lies.

Anyone noticed this problem?

Comments

stborchert’s picture

Hi.
I've tested this right now with the latest version and can't confirm the problem. Do you have any additional modules installed which alters the node form?

adnasa’s picture

Hi,
All I've done sofar was added a hook_form_alter to hide some form-elements I didn't need at the form.
no other modules alters the form.

Tested again here, same problem :-/
what I did to fix it

  // during a form_alter
  if($form['nid']['#value'] == NULL) {
    $form['body_field']['body']['#after_build'][] = 'mymodule_populate_body';
  }
  
  //declare another function
  function mymodule_populate_body($form, &$form_state) {
    $form['#value'] = $form_state['storage']['values']['body'];
    return $form;
  }

It feels dirty, though.

stborchert’s picture

Could you post your hook_form_alter? I've tried with different scenarios but could not get this error.

stborchert’s picture

Status: Active » Postponed (maintainer needs more info)

Please provide more info.

stborchert’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)