Filter Detail

Filter Name:frm_validate_field_entry
Declaration:
apply_filters( 'frm_validate_field_entry', $errors, $posted_field, $value, $args );
Filter Type:
Static
In class:
Location:
formidable/classes/models/FrmEntryValidate.php
Pro function:
No

Contribute Comments or Examples

Codex Comments/Examples
First
Last
Mastermind Contributor: Lisa Thrower

I helped someone with this in the slack group so thought I would put it here as well. It adds field validation to make sure the user is entering a higher value than any previously entered. It uses FrmEntryMeta::get_entry_metas_for_field to get the existing entry values.

add_filter('frm_validate_field_entry', 'require_higher_bid', 10, 3);
function require_higher_bid($errors, $posted_field, $posted_value){
if ( $posted_field->id == 25 && $posted_value != '' ) { //change 25 to the ID of the field to change
$previous_bids = FrmEntryMeta::get_entry_metas_for_field( $posted_field->id ) ;
$high_bid = max($previous_bids);
if ($posted_value id] = 'Looks like you have been outbid! Raise your bid and try again!';
}
return $errors;
}