Add approved source domain

add_filter(‘frm_signature_allowlist_domains’, ‘add_approved_src_domain’); function add_approved_src_domain($whitelisted_domains){ $whitelisted_domains[] = ‘cdn.formidableforms.com’; return $whitelisted_domains; }Continue reading

Open a target field

add_filter( ‘frm_section_is_open’, ‘open_section_for_target_field’, 10, 2 ); function open_section_for_target_field( $open, $field ) { $target_section_id = 18635; //Replace 18635 with the section field ID $id = is_object( $field ) ? $field->id : $field[‘id’]; if ( (int) $id === $target_section_id ) { $open…Continue reading

Filter page break fields

$page_number = 1; // Reset page name each time an entry shortcode begins. add_filter( ‘frm_show_entry_defaults’, function( $defaults ) use ( &$page_number ) { $page_number = 1; return $defaults; } ); add_filter( ‘frm_display_break_value_custom’, function( $value, $args ) use ( &$page_number )…Continue reading

Turn off file referer check for Zapier

add_filter( ‘frm_check_file_referer’, ‘turnoff_file_referer_check_for_zapier’ ); function turnoff_file_referer_check_for_zapier( $check_referer ) { if ( ! $check_referer ) { return false; } return FrmAppHelper::get_server_value( ‘HTTP_USER_AGENT’ ) !== ‘Zapier’; }Continue reading

Filter the canonical URL for a published View

add_filter( ‘get_canonical_url’, ‘filter_canonical_url_for_view_inside_page’, 10, 2 ); function filter_canonical_url_for_view_inside_page( $canonical_url, $post ) { $target_post_id = 180; //Replace 180 with the target page ID $target_view_id = 179; //Replace 179 wth the specific View ID if ( $target_post_id !== $post->ID ) { return…Continue reading

Change email fields to lowercase

add_filter(‘frm_validate_field_entry’, ’email_field_lowercase_validation’, 8, 3); function email_field_lowercase_validation($errors, $posted_field, $posted_value){ if($posted_field->type == ’email’){ $_POST[‘item_meta’][$posted_field->id] = mb_strtolower($posted_value); } return $errors; }Continue reading

Convert number field value to integer

add_filter(‘frm_acf_frm_to_acf’, ‘frm_acf_frm_to_integer’ , 10, 2); function frm_acf_frm_to_integer( $new_value, $args ) { if ( ‘number’ === $args[‘acf_field’][‘type’] && ‘number’ === $args[‘frm_field’]->type ) { $new_value = intval( $new_value ); } return $new_value; }Continue reading