function encryptfapi_form_alter in Encrypt Form API 7.2
Implements hook_form_alter().
Alters forms that are marked as having encrypted fields.
File
- ./
encryptfapi.module, line 29 - Main module file for Encrypt Form API.
Code
function encryptfapi_form_alter(&$form, &$form_state, $form_id) {
// If the form has no encrypted fields, don't do anything.
if (!isset($form['#encrypted_fields']) || $form['#encrypted_fields'] != TRUE) {
return;
}
_encryptfapi_decrypt_element($form);
// Add the validate function.
$form['#validate'][] = '_encryptfapi_form_validate';
}