I’m building a module that implement a multistep form based on a custom entity. The entity contains fields which are created by the install file.
I was able to create the steps and if I print the $form_state[storage] array in the last step I can see all the values entered all along the form.
But when I submit the last step the entity is empty. This is what I have in the last_step_submit:
$organisation = entity_ui_form_submit_build_entity('organisation',$organisation, $form, $form_state); $organisation->save(); drupal_set_message(t('The organisation: @name has been saved.', array('@name' => $organisation->name))); $form_state['redirect'] = 'admin/organisations';
I know that I’m missing something but really I can’t figure out what. I’m quite new in module developing and I’d appreciate any help.