Remove the time limit for all forms
add_filter( ‘frm_time_to_check_duplicates’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_time_to_check_duplicates’, ‘__return_false’ );Continue reading
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 “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
add_filter(‘frm_combo_dropdown_label’, ‘add_cc_labels’, 10, 2 ); function add_cc_labels( $label, $atts ) { if ( $atts[‘key’] == ‘month’ ) { $label = ‘Month’; } elseif ( $atts[‘key’] == ‘year’ ) { $label = ‘Year’; } return $label; }Continue reading
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
add_filter(‘frm_to_email’, ‘stop_the_email’, 10, 4); function stop_the_email($recipients, $values, $form_id, $args){ if ( $form_id == 5 && $args[’email_key’] == 123 ) { //change 5 to the id of the form and 123 to the ID of your email notification if ( isset(…Continue reading
add_filter(‘frm_user_can_edit’, ‘check_user_edit_entry’, 10, 2); function check_user_edit_entry($edit, $args){ $form_id = is_numeric($args[‘form’]) ? $args[‘form’] : $args[‘form’]->id; if ( $form_id == 45 ){ //change 45 to the ID of your form if ( is_numeric( $args[‘entry’] ) ) { $entry = FrmEntry::getOne( $args[‘entry’] );…Continue reading
add_filter(‘frm_user_can_edit’, ‘maybe_prevent_user_edit_entry’, 10, 2); function maybe_prevent_user_edit_entry( $edit, $args ){ if ( ! $edit ) { // user can’t edit anyway, so don’t check return $edit; } if ( $args[‘form’]->id != 45 ) { //change 45 to the ID of your…Continue reading
add_filter(‘frm_update_entry’, ‘frm_updated_at’); function frm_updated_at( $new_values ){ if ( defined( ‘WP_IMPORTING’ ) && WP_IMPORTING ) { unset( $new_values[‘updated_at’] ); } return $new_values; }Continue reading
add_action(‘frm_after_create_entry’, ‘link_fields’, 30, 2); add_action(‘frm_after_update_entry’, ‘link_fields’, 10, 2); function link_fields($entry_id, $form_id){ if($form_id == 113){//Change 113 to the ID of the first form global $wpdb; $first_field = $_POST[‘item_meta’][25]; //change 25 to the ID of the field in your first form $user…Continue reading