Check if one of two fields contains a value

add_filter(‘frm_where_filter’, ‘custom_or_filter’, 10, 2); function custom_or_filter($where, $args){ if ( $args[‘display’]->ID == 3 && $args[‘where_opt’] == 100 ) {//Change 3 to the ID of the View. Change 100 to the ID of the field you have added as a filter and…Continue reading

Add two filters combined with OR

add_filter(‘frm_where_filter’, ‘custom_or_filter_two_values’, 10, 2); function custom_or_filter_two_values($where, $args){ $view_id = 4131;// Replace with your View ID $field_1 = 363;// Replace with ID of Field A $field_2 = 426;// Replace with the ID of Field B $search_term_1 = ‘test’;// Replace with the…Continue reading

Check if current user is owner/creator

add_filter(‘frmpro_fields_replace_shortcodes’, ‘frm_userid_shortcode1’, 10, 4); function frm_userid_shortcode1($replace_with, $tag, $atts, $field){ if(isset($atts[‘is_current_user’])){ global $user_ID; if ( !$user_ID || ( $user_ID && $user_ID != $replace_with ) ) { $replace_with = ”; } } return $replace_with; }Continue reading

Customize Email Subject

add_filter(‘frm_email_subject’, ‘change_subject’, 10, 2); function change_subject($subject, $atts){ extract($atts); if($form->id == 45){ //Replace 45 with the ID of your form. $subject = ‘Thank You’; //Replace Thank You with your email subject } return $subject; }Continue reading

Remove the time limit for a specific form

add_filter(‘frm_time_to_check_duplicates’, ‘change_duplicate_time_limit_one_form’, 10, 2); function change_duplicate_time_limit_one_form( $time_limit, $entry_values ){ if ( $entry_values[‘form_id’] == 100 ) { //change 100 to your form ID $time_limit = 0; } return $time_limit; }Continue reading

Add Media Button to TinyMCE Editor

// Add “Add Media” button to TinyMCE editor add_filter(‘frm_rte_options’, ‘frm_rte_options’, 10, 2); function frm_rte_options($opts, $field){ $opts[‘media_buttons’] = true; return $opts; }Continue reading

Email Routing

add_filter(‘frm_to_email’, ‘custom_set_email_value’, 10, 4); function custom_set_email_value($recipients, $values, $form_id, $args){ if($form_id == 5 && $args[’email_key’] == 4933){ // change 5 to the id of your form and 4933 with the ID of the email foreach ( $values as $value ) {…Continue reading