function ctools_user_category_edit_form_from_user_settings_form

Settings form for the relationship.

1 string reference to 'ctools_user_category_edit_form_from_user_settings_form'
user_category_edit_form_from_user.inc in plugins/relationships/user_category_edit_form_from_user.inc
Plugin to provide an relationship handler for term from node.

File

plugins/relationships/user_category_edit_form_from_user.inc, line 44

Code

function ctools_user_category_edit_form_from_user_settings_form($form, &$form_state) {
    $conf = $form_state['conf'];
    $categories = _user_categories();
    $options = array();
    foreach ($categories as $category) {
        $options[$category['name']] = $category['title'];
    }
    $form['category'] = array(
        '#type' => 'select',
        '#title' => t('Category'),
        '#options' => $options,
        '#default_value' => isset($conf['category']) ? $conf['category'] : NULL,
        '#empty_option' => 'Default',
    );
    return $form;
}