You are here

function profile2_page_form_callback in Profile 2 7

Same name and namespace in other branches
  1. 7.2 contrib/profile2_page.module \profile2_page_form_callback()

Form callback for entity_form().

1 string reference to 'profile2_page_form_callback'
profile2_page_entity_info_alter in contrib/profile2_page.module
Implements hook_entity_info_alter().

File

contrib/profile2_page.module, line 269
Adds separate pages for viewing and editing profiles.

Code

function profile2_page_form_callback($profile) {

  // Pre-populate the form-state with the right form include.
  $form_state = form_state_defaults();
  form_load_include($form_state, 'inc', 'profile2_page');
  return entity_ui_get_form('profile2', $profile, 'edit', $form_state);
}