Add WeChat Pay

add_filter(‘frm_stripe_payment_method_types’, ‘add_wechat_pay’, 10, 2); function add_wechat_pay( $payment_method_types, $args ) { $form_id = $args[‘form_id’]; $target_form_id = 5; // Change 5 to the ID of your form if ( $target_form_id === $form_id ) { $payment_method_types[] = ‘wechat_pay’; } return $payment_method_types; }Continue reading

Add form HTML in Outcome Quiz

add_filter(‘frm_main_feedback’, ‘add_form_outcome_quiz’ , 11, 3); function add_form_quiz_result( $message, $form, $entry_id ) { $target_form_id = 435; //Replace 435 with the ID of the form with the outcome quiz if ( $target_form_id !== (int) $form->id ) { return $message; } $form_id_by_result =…Continue reading

Change cron job

add_filter(‘frm_mark_abandonment_entries_period’, ‘change_cron_job’); function change_cron_job() { return 2; //This is 1 by default and it would increase to 2 by utilizing this hook. }Continue reading

Exclude fields from abandonment

add_filter(‘frm_abandonment_exclude_field_types’, ‘frm_abandonment_exclude_field_types’); function frm_abandonment_exclude_field_types($excluded_fields){ return array_merge($excluded_fields, array(‘number’));// This will exclude number field besides default password field. }Continue reading

Show results that begin with search query

add_filter(‘frm_chosen_js’, ‘chosen_js’); function chosen_js( $opts ) { $opts = array( ‘allow_single_deselect’ => true, ‘no_results_text’ => __( ‘No results match’, ‘formidable’ ), ‘search_contains’ => false, ); return $opts; }Continue reading

Change the CSS location

add_filter(‘get_frm_stylesheet’,’frm_stylesheet_change_loc’); function frm_stylesheet_change_loc( $sheet ) { $sheet[‘formidable’] = home_url() . ‘/something.css’; //Replace something.css return $sheet; } //When we want to save the $css option when saving the style, we can hook in there too to generate the file. add_action(‘update_option_frmpro_css’,’save_css_string’); function…Continue reading

Limit options in TinyMCE Editor

add_filter(‘frm_rte_options’, ‘rte_limit_options’, 10, 2); function rte_limit_options($opts, $field){ $opts[‘tinymce’] = array(“toolbar1” => “undo redo bold italic alignleft aligncenter alignright alignjustify | bullist numlist outdent indent”); return $opts; }Continue reading

Reverse entry order in a repeater

add_filter(‘frmpro_fields_replace_shortcodes’, ‘reverse_entry_order_repeater’, 10, 4); function reverse_entry_order_repeater( $value, $tag, $atts, $field ) { if ( ! empty( $atts[‘foreach_entry_order’] ) && ‘desc’ === $atts[‘foreach_entry_order’] ) { arsort( $value ); } return $value; }Continue reading

Filter payment method

add_filter(‘frm_stripe_payment_method_types’, ‘filter_stripe_payment_method’, 10, 2); function filter_stripe_payment_method( $payment_method_types, $args ) { $map = array( 75 => array( ‘affirm’ ), 76 => array( ‘card’, ‘link’, ‘klarna’ ), ); $form_id = $args[‘form_id’]; if ( isset( $map[ $form_id ] ) ) { $payment_method_types =…Continue reading