You are here

function pcp_form_alter in Profile Complete Percent 7

Same name and namespace in other branches
  1. 5 pcp.module \pcp_form_alter()
  2. 6 pcp.module \pcp_form_alter()

Implements hook_form_alter().

File

./pcp.module, line 537
Allows users with valid permissions to tag profile fields (core fields or Profile2 fields) for a users profile to be considered complete.

Code

function pcp_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'user_profile_form' || strpos($form_id, 'profile2_edit') === 0) {

    // Add JS that will hightlight target field.
    drupal_add_js(drupal_get_path('module', 'pcp') . '/pcp.js');
  }
}