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

Attach a static file

add_filter(‘frm_notification_attachment’, ‘add_my_attachment’, 10, 3); function add_my_attachment($attachments, $form, $args){ //$args[‘entry’] includes the entry object if ( $args[’email_key’] == 1277 ) { //change 1277 to the ID of your email notification $attachments[] = ABSPATH . ‘/’.’wp-content/uploads/2015/02/filename.pdf’; //set the ABSOLUTE path to the…Continue reading

Remove automatic attachment

add_filter(‘frm_notification_attachment’, ‘remove_my_attachment’, 10, 3); function remove_my_attachment($attachments, $form, $args) { if ( $args[’email_key’] == 1277 ) { //change 1277 to the email ID that you would like to DROP the attachment for $attachments = array(); //remove all attachments } return $attachments;…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