You are here

function pcp_delete_field_requireness in Profile Complete Percent 7

Same name and namespace in other branches
  1. 6.2 pcp.module \pcp_delete_field_requireness()

Called when a user deletes a profile field We then need to delete the pcp value too

1 string reference to 'pcp_delete_field_requireness'
pcp_form_field_ui_field_delete_form_alter in ./pcp.module
Implements hook_form_FORM_ID_alter(). We need an extra submit handler to delete the PCP field settings when a field is deleted

File

./pcp.module, line 530
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_delete_field_requireness($form, &$form_state) {
  _pcp_disable_field($form_state['values']['entity_type'], $form_state['values']['field_name'], $form_state['values']['bundle']);
}