Limit geo graph to specific region

add_filter(‘frm_google_chart’, ‘frm_limit_graph_region’, 10, 2); function frm_limit_graph_region( $options, $args ) { if ( isset( $args[‘atts’][‘title’] ) && $args[‘atts’][‘title’] == ‘My graph title’ ) { $options[‘region’] = ‘IT’; } return $options; }Continue reading

Re-order fields in cart

add_filter( ‘wc_fp_cart_fields’, ‘frm_reorder_wc_cart_fields’, 10, 2 ); function frm_reorder_wc_cart_fields( $fields, $form_id ) { if ( $form_id == 12 ) { $reordered_fields = array(); foreach ( $fields as $key => $field ) { if ( $field->id == 123 ) { $reordered_fields[0] =…Continue reading

Show only for admins

add_filter( ‘frm_show_delete_all’, ‘frm_maybe_hide_button’ ); function frm_maybe_hide_button( $show ) { $show = current_user_can(‘administrator’); return $show; }Continue reading

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