Support » Plugins and Hacks » Formidable Forms » [Plugin: Formidable Forms] Verify field data

[Plugin: Formidable Forms] Verify field data

  • Is there a way to verify what is entered in a field against a list of possible answers. I need to find a way to make sure whoever fills out the form has authorization – namely their union card number.

Viewing 1 replies (of 1 total)
  • Plugin Author Steph Wells


    Here’s some example code to add in a new plugin or your theme functions.php. For more support, please post in the Formidable forums.

    add_filter('frm_validate_field_entry', 'check_for_valid_code', 10, 3);
    function check_for_valid_code($errors, $field, $value){
    if($field->id == 20){ //change 20 to the id of the field that should be checked
      $codes = 'enter,your,comma,separated,list,of,codes,here';
      $codes = explode(',',$codes);
      if(!in_array($value, $codes)
        $errors['field'.$field->id] = 'That is not a valid code';
    return $errors;
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Formidable Forms] Verify field data’ is closed to new replies.