You are here

function _genpass_get_form_item in Generate Password 8

Same name and namespace in other branches
  1. 6 genpass.module \_genpass_get_form_item()
  2. 7 genpass.module \_genpass_get_form_item()

Helper function to find a item in the user form.

Since its position within the form-array depends on the profile module (account-category).

2 calls to _genpass_get_form_item()
genpass_form_alter in ./genpass.module
Implements hook_form_alter().
genpass_register_validate in ./genpass.module
User registration validation.

File

./genpass.module, line 108
Contains genpass.module.

Code

function &_genpass_get_form_item(&$form, $field) {
  if (isset($form['account'][$field])) {
    return $form['account'][$field];
  }
  else {
    return $form[$field];
  }
}