diff --git a/profile2.module b/profile2.module index beb3d9b..bc623a9 100644 --- a/profile2.module +++ b/profile2.module @@ -494,10 +495,10 @@ function template_preprocess_profile2(&$variables) { */ function profile2_form_field_ui_field_edit_form_alter(&$form, &$form_state) { if ($form['instance']['entity_type']['#value'] == 'profile2') { - $form['field']['settings']['profile2_private'] = array( + $form['instance']['settings']['profile2_private'] = array( '#type' => 'checkbox', '#title' => t('Make the content of this field private'), - '#default_value' => !empty($form['#field']['settings']['profile2_private']), + '#default_value' => !empty($form['#instance']['settings']['profile2_private']), '#description' => t('If checked, the content of this field is only shown to the profile owner and administrators.'), ); }