function ctools_user_form_component_content_type_edit_form

Ctools plugin configuration edit form for the selectable form field.

Provide the list of fields in the user profile edit form to select from the plugin configuration.

File

plugins/content_types/user_form/user_form_component.inc, line 50

Code

function ctools_user_form_component_content_type_edit_form($form, &$form_state) {
    $conf = $form_state['conf'];
    $user_form = drupal_get_form('user_profile_form');
    $field_keys = element_children($user_form);
    $options = array_combine($field_keys, $field_keys);
    $form['field'] = array(
        '#type' => 'select',
        '#title' => t('User form field'),
        '#options' => $options,
        '#description' => t('Select a form field from the current user form to display in this pane.'),
        '#default_value' => !empty($conf['field']) ? $conf['field'] : '',
    );
    return $form;
}