1 entity_example.module entity_example_basic_form_submit($form, &$form_state)

Form submit handler: Submits basic_add_form information.

Related topics

File

modules/examples/entity_example/entity_example.module, line 454
Hook implementations for the Entity Example module.

Code

function entity_example_basic_form_submit($form, &$form_state) {
  $entity = $form_state['values']['basic_entity'];
  $entity->item_description = $form_state['values']['item_description'];
  field_attach_submit('entity_example_basic', $entity, $form, $form_state);
  $entity = entity_example_basic_save($entity);
  $form_state['redirect'] = 'examples/entity_example/basic/' . $entity->basic_id;
}