function certificate_fields in Certificate 6
Define Fields.
2 calls to certificate_fields()
- certificate_settings_form in ./
certificate.admin.inc - Form for field mapping allowed values to certificate templates.
- certificate_settings_form_submit in ./
certificate.admin.inc - Submit handler for global field mapping form.
File
- ./
certificate.module, line 358 - Certificate module.
Code
function certificate_fields() {
$field_options = array();
$field_options[] = 'no field';
foreach (content_fields() as $key => $field) {
// If field isn't a profile field with allowed values, do not allow it to be selectable. It wouldn't work anyways.
if ($field['type_name'] == 'profile' && ($field['allowed_values'] != '' || $field['allowed_values_php'] != '')) {
$field_options[$key] = $field['widget']['label'];
}
}
return $field_options;
}