You are here

function profile2_from_user_settings_form in Profile 2 7

Same name and namespace in other branches
  1. 7.2 plugins/relationships/profile2.inc \profile2_from_user_settings_form()

Settings form for the relationship.

1 string reference to 'profile2_from_user_settings_form'
profile2.inc in plugins/relationships/profile2.inc
Plugin to provide an relationship handler for profile2 from user.

File

plugins/relationships/profile2.inc, line 43
Plugin to provide an relationship handler for profile2 from user.

Code

function profile2_from_user_settings_form($form, &$form_state) {
  $conf = $form_state['conf'];
  $options = array();
  foreach (profile2_get_types() as $type => $info) {
    $options[$type] = $info->label;
  }
  $form['type'] = array(
    '#type' => 'select',
    '#title' => t('Select Profile2 Type'),
    '#options' => $options,
    '#default_value' => $conf['type'],
    '#prefix' => '<div class="clearfix">',
    '#suffix' => '</div>',
  );
  return $form;
}