function pcp_form_profile_field_form_alter in Profile Complete Percent 6.2
Implementation of hook_form_FORM_ID_alter().
File
- ./
pcp.module, line 89 - Allows users with valid permissions to tag profile fields created from the profile module as required fields for a users profile to be considered complete.
Code
function pcp_form_profile_field_form_alter(&$form, $form_state) {
if (user_access('administer pcp')) {
$form['fields']['pcp_tag'] = array(
'#type' => 'checkbox',
'#title' => t('Make required for PCP module'),
'#description' => t('Checking this box will tag this field as a required field for completion of the users profile.'),
'#default_value' => _pcp_field_is_tagged($form['fid']['#value']),
);
$form['#submit'][] = 'pcp_profile_field_form_submit';
}
}