Always open sections
add_filter( ‘frm_section_is_open’, ‘__return_true’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_section_is_open’, ‘__return_true’ );Continue reading
$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
add_filter( ‘frm_check_file_referer’, ‘__return_false’ );Continue reading
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
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
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
add_filter(‘frm_acf_acf_number_to_frm_number’, ‘frm_acf_acf_number_to_integer’, 10, 2); function frm_acf_acf_number_to_integer( $new_value, $args ) { return intval( $new_value ); }Continue reading
add_filter( ‘frm_api_charset_options’, ‘add_api_charset_options’ ); function add_api_charset_options( $charset_options ) { $charset_options[] = ‘windows-1252’; return $charset_options; }Continue reading
add_filter(‘frm_before_duplicate_entry_values’, ‘before_duplicate_entry’); function before_duplicate_entry( $metas ) { $target_field_id = 950; // Replace 950 with your field ID. foreach ( $metas as $meta ) { if ( $target_field_id === (int) $meta->field_id ) { $meta->meta_value = ‘Duplicate of ‘ . $meta->meta_value; break;…Continue reading
add_filter(‘frm_global_failed_msg’, ‘change_global_failed_msg_form’, 10, 2); function change_global_failed_msg_form( $message, $settings ) { $target_form_id = 852; // change 852 with the ID of your form if ( $target_form_id === (int) $settings->current_form ) { $message = ‘Custom failed message for target form ID’; }…Continue reading