Filter a field for one of two values

add_filter( ‘frm_where_filter’, ‘frm_custom_or_filter’, 10, 2 ); function frm_custom_or_filter( $where, $args ) { $view_id = 118;// Replace with your View ID $field = 165;// Replace with ID of your field $search_val_1 = ‘toy‘;// Replace with the first value $search_val_2 = ‘book‘;//…Continue reading

Allow the [gallery] shortcode

add_filter( ‘frm_sanitize_shortcodes’, ‘maybe_allow_user_shortcodes’, 10, 2 ); function maybe_allow_user_shortcodes( $sanitize, $atts ) { if ( strpos( $atts[‘value’], ‘[gallery’ ) !== false ) { $sanitize = false; } return $sanitize; }Continue reading

Add extra content to lookup options

add_filter( ‘frm_filtered_lookup_options’, ‘change_lookup_options’, 10, 2 ); function change_lookup_options( $options, $args ) { if ( $args[‘field’]->id == 25 ) { // change 25 to the id of the field in the other form foreach ( $options as $k => $option )…Continue reading

Hide variation price

add_filter( ‘wc_fp_addons_format_cart_item_price’, ‘remove_variation_price’ ); function remove_variation_price( $value ) { $formatted = ”; return $formatted; }Continue reading

Add text styling to pie graph

add_filter(‘frm_google_chart’, ‘frm_pie_chart_styling’, 10, 2); function frm_pie_chart_styling($options, $atts){ if ( $atts[‘type’] == ‘pie’ ) { $options[‘pieSliceTextStyle’] = array(‘color’ => ‘red’); } return $options; }Continue reading

Modify field types in order

add_filter( ‘wc_fp_exclude_fields’, ‘frm_adjust_exclude_fields’ ); function frm_adjust_exclude_fields( $exclude ) { $key = array_search( ‘textarea’, $exclude ); if ( $key !== false ) { unset( $exclude[ $key ] ); } return $exclude; }Continue reading

Include or exclude fields in cart

add_filter( ‘wc_fp_include_field_in_cart’, ‘frm_show_field_in_cart’, 10, 3 ); function frm_show_field_in_cart( $display, $field, $value ) { if ( in_array( $field->id, array( ‘123’, ‘345’, ‘456’ ) ) ) { $display = true; } else if ( in_array( $field->id, array( ‘987’, ‘765’, ‘543’ ) )…Continue reading