You are here

function _botcha_pick_patsy_field in BOTCHA Spam Prevention 7

Same name and namespace in other branches
  1. 6 botcha.botcha.inc \_botcha_pick_patsy_field()

Pick a field to obscure botcha and not give our honeypot away. Furthermore, any validation errors on this field will remove our error.

1 call to _botcha_pick_patsy_field()
_botcha_recipes in ./botcha.botcha.inc

File

./botcha.botcha.inc, line 59
Implementation of botcha form logic.

Code

function _botcha_pick_patsy_field($form, $fields) {
  if (!is_array($fields)) {
    $fields = array(
      $fields,
    );
  }
  foreach ($fields as $field) {

    // FIXME: should check presence of this field...
    return $field;
  }

  //FIXME: If none of the suggested fields are present, return first visible field
}