• Go to Formidable Forms Official Site
  •  Login
  •  

Log In

Forgot Password

Search

Formidable Forms Community Site

Mathias

Validate repeating fields for one specefic entry

Hi, there is a example code for Validate field in repeating section add_filter('frm_validate_field_entry', 'my_custom_validation', 10, 4); function my_custom_validation($errors, $posted_field, $posted_value, $args){ if($posted_field->id == 102){ //change to the ID of the field to validate if(!in_array($posted_value, array(123456,987654,234567))){ //enter your allowed values //if it doesn't match up, add an error: $errors['field'. $args['id']] = 'Not a Valid Serial Number'; } } return $errors; } But there will only one repeating field after the other be validated. Is there a hook to get all repeating fields of one section and check, if there is one entry used. Maybe I got the Entries 1,2,3,4,5,6 and the user got to use one time the entry 4. How can I validate, if the user has used this entry? Greetings, Mathias  

Navigation

  • Privacy Policy
  • Formidable Forms for WordPress

Discussions

  • An add-on
  • Creating posts/pages
  • Emails
  • Entries
  • Filter & Action Hooks
  • Forms
  • Getting Started
  • Importing/Exporting
  • Javascript
  • Reports, Graphs and Statistics
  • Styles
  • Styling
  • Tips & Tricks
  • Views

Disclaimer

The purpose of this site is to help members of the Formidable Forms Community interact with one another, provide examples of custom code and help others with topics that may not be covered by support on the main Formidable Forms website. If you are seeking support from the Formidable Forms team, please create a ticket on the Formidable Forms website.

Copyright © 2021 Strategy11, LLC