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

Add your custom data to the backend JS

add_filter(‘frm_acf_backend_js_data’, ‘acf_backend_js_data’, 10, 2}; function acf_backend_js_data( $data, $args ) { $data[‘form_action_id’] = $args[‘form_action’]->ID; $data[‘strings’][‘custom_string’] = ‘Your custom string’; $data[‘custom_data’] = ‘Your custom data’; return $data; }Continue reading

Change Outcome Quiz image border radius for one form

add_filter(‘frm_quiz_outcome_image_border_radius’, ‘change_quiz_outcome_image_border_radius_form’, 10, 2); function change_quiz_outcome_image_border_radius_form( $border_radius, $args ) { $target_form_id = 267; //Change 267 to the ID of your form if ( $target_form_id === $args[‘form_id’] ) { $border_radius = ‘100px’; //change 100px } return $border_radius; }Continue reading

Change Outcome Quiz image border radius for a field

add_filter(‘frm_quiz_outcome_image_border_radius’, ‘change_quiz_outcome_image_border_radius_field’, 10, 2); function change_quiz_outcome_image_border_radius_field( $border_radius, $args ) { $target_outcome_id = 1168; //Change 1168 to the ID of your Outcome Quiz field if ( $target_outcome_id === $args[‘outcome’]->ID ) { $border_radius = ‘100px’; //change 100px } return $border_radius; }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