Disable file URLs for uploaded file

add_action( ‘frm_field_input_html’, ‘disable_dropzone_urls’ ); function disable_dropzone_urls( $field ) { $field_id = 4626; // change 4626 to your field ID if ( $field_id !== (int) $field[‘id’] ) { return; } global $frm_vars; $key = ‘file’ . $field_id; if ( ! array_key_exists(…Continue reading

Adjust values displayed in cart for specific field types

add_filter( ‘wc_fp_cart_item_data’, ‘modify_frm_woo_display_for_number_fields’, 10, 2 ); function modify_frm_woo_display_for_number_fields( $values, $args ) { if ( $args[‘field’]->type ==”number”) { $end_position = strpos( $values[‘display’], ‘ (‘ ); $values[‘display’] = substr( $values[‘display’], 0, $end_position ); } return $values; }Continue reading

Add custom formatter class for email

add_filter( ‘frm_entry_formatter_class’, ‘use_custom_formatter_class’, 10, 2 ); function use_custom_formatter_class( $class, $atts ) { if ( ‘custom’ === $atts[‘format’] ) { return ‘CustomEntryFormatter’; } return $class; } class CustomEntryFormatter extends FrmEntryFormatter { public function __construct( $atts ) { parent::__construct( $atts ); $this->format…Continue reading

Add custom class to a form

add_filter( ‘frm_add_form_style_class’, ‘add_style_class’, 10, 3 ); function add_style_class( $class, $style, $args = array() ) { $target_form_id = 439; // change 439 to your form ID. if ( ! empty( $args[‘form’] ) && ! empty( $args[‘form’][‘fields’] ) ) { $field =…Continue reading

Check if a user exists or not

add_filter(‘frm_filter_view’, ‘check_if_users_exists’, 10, 2); function check_if_users_exists( $view ) { $target_view_id = 380; // change this to your View ID. if ( $target_view_id !== (int) $view->ID ) { return $view; } $target_form_id = $view->frm_form_id; global $wpdb; $item_ids = FrmDb::get_col( $wpdb->prefix .…Continue reading

Set quiz field as correct

add_filter( ‘frm_quiz_is_correct’, ‘is_quiz_correct’, 10, 2 ); function is_quiz_correct( $is_correct, $args ) { $target_field_id = 1246; // Change 1246 with your field ID if ( $target_field_id === (int) $args[‘field’]->id ) { $is_correct = true; } return $is_correct; }Continue reading

Change progress bar text

add_filter(‘frm_chat_progress_text’, ‘frm_chat_change_progress_text’, 10, 2); function frm_chat_change_progress_text( $text, $form ) { $target_form_id = 225; // change 225 to your form ID. if ( $target_form_id === (int) $form->id ) { return ‘[current] / [total]’; } return $text; }Continue reading

Show progress bar text with percent sign

add_filter(‘frm_chat_progress_text’, ‘frm_chat_show_percent_sign’, 10, 2); function frm_chat_show_percent_sign( $text, $form ) { $target_form_id = 225; // change 225 to your form ID. if ( $target_form_id === (int) $form->id ) { return ‘[current show=percent]%’; } return $text; }Continue reading