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

Add API character set options

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

Change duplicated value

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

Change failed message for specific form

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

Allow submissions from allowlist of referrer URLs

add_filter(‘frm_validate_entry’, ‘allowlist_referrer_url’ ,10, 2); function allowlist_referrer_url( $errors, $values ) { $target_form_id = 215; // Change 215 to the ID of your form. if ( $target_form_id !== (int) $values[‘form_id’] ) { return $errors; } $referer = FrmAppHelper::get_server_value( ‘HTTP_REFERER’ ); $referer_allowlist =…Continue reading

Disable rich text email for specific action

add_filter( ‘frm_rich_text_emails’, ‘disable_rich_text_email_for_specific_action’, 10, 2 ); function disable_rich_text_email_for_specific_action( $rich_text_emails, $args ) { $target_action_id = 2381; //Replace 2381 with your email action ID if ( $target_action_id === $args[‘form_action’]->ID ) { $rich_text_emails = false; } return $rich_text_emails; }Continue reading

Disable rich text email for specific form

add_filter( ‘frm_rich_text_emails’, ‘disable_rich_text_email_for_specific_form’, 10, 2); function disable_rich_text_email_for_specific_form( $rich_text_emails, $args ) { $target_form_id = 338; //Replace 338 with your form ID if ( $target_form_id === (int) $args[‘form’]->id ) { $rich_text_emails = false; } return $rich_text_emails; }Continue reading