function _content_profile_registration_get_field_select in Content Profile 6
Returns an array of selectable form elements that may be hidden, mostly containing CCK fields.
Parameters
string $type: A content type to get the select elements for.
Return value
Array An array of fields suitable for use in a select field.
1 call to _content_profile_registration_get_field_select()
- content_profile_registration_form_alter in modules/
content_profile_registration.module - Implementation of hook_form_alter().
File
- modules/
content_profile_registration.module, line 82 - Allows exposure and processing of content_profile node fields at user registration
Code
function _content_profile_registration_get_field_select($type) {
$fields = module_exists('content') ? _content_profile_registration_get_fields($type) : array();
$return = array();
if (!module_exists('auto_nodetitle') || auto_nodetitle_get_setting($type) != AUTO_NODETITLE_ENABLED) {
$return['title'] = t('Title');
}
foreach ($fields as $fieldname => $info) {
if (!$info['required']) {
$return[$fieldname] = drupal_ucfirst($info['widget']['label']);
}
}
$return['other'] = t('Other form elements (except for required CCK fields)');
return $return;
}