Formidable Forms
Verify field data (2 posts)

  1. torweb
    Posted 4 years ago #

    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.

  2. Steph Wells
    Plugin Author

    Posted 4 years ago #

    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;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Formidable Forms
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic