Filter back end form settings
add_filter( ‘frm_disallow_unfiltered_html’, ‘__return_true’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_disallow_unfiltered_html’, ‘__return_true’ );Continue reading
add_filter(‘frm_chat_start_page_content’, ‘frm_chat_add_html’, 10, 2); function frm_chat_add_html( $start_page_content, $args ) { $target_form_id = 310; // change 310 to your form ID. if ( $target_form_id === (int) $args[‘form’]->id ) { $start_page_content .= ‘<br>’; $start_page_content .= ‘Additional start page content’; } return $start_page_content;…Continue reading
add_action(‘frm_after_create_entry’, ‘frm_add_gallery_to_product’, 60, 2); function frm_add_gallery_to_product( $entry_id, $form_id ) { if ( $form_id == 1705 ) {// Replace 1705 with the ID of your form $entry = FrmEntry::getOne( $entry_id ); if ( ! $entry->post_id ) { return; } update_post_meta($entry->post_id, ‘_product_image_gallery’,…Continue reading
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 && ‘Alternative answer’ === $args[‘value’] ) { // Change the text for…Continue reading
add_action( ‘frm_payment_status_complete’, ‘frm_trigger_action_payment_complete’ ); function frm_trigger_action_payment_complete( $atts ) { $target_action_id = 450; // change 450 to your payment action ID if ( $atts[‘payment’]->status == ‘complete’ && $target_action_id === (int) $atts[‘payment’]->action_id ) { $to = get_option( ‘admin_email’ ); $subject = ‘Payment…Continue reading
add_action( ‘frm_payment_status_complete’, ‘frm_change_the_role’ ); function frm_change_the_role( $atts ) { $new_role = ‘contributor’; // change contributor to the new user role $entry = isset( $atts[‘entry’] ) ? $atts[‘entry’] : $atts[‘payment’]->item_id; if ( is_numeric( $entry ) ) { $entry = FrmEntry::getOne( $entry…Continue reading
add_filter(‘frm_validate_field_entry’, ‘check_correct_answer’, 10, 3); function check_correct_answer( $errors, $posted_field, $value ) { $target_field_id = 1248; // change 1248 to the ID of the field to check $expected_answer = ‘Answer 1’; // change ‘Answer 1’ with the expected answer if ( $target_field_id…Continue reading
add_filter( ‘frm_protect_temporary_file’, ‘__return_false’ );Continue reading
add_filter( ‘frm_pro_fields_in_summary_values’, ‘exclude_field_from_summary’, 10, 2 ); function exclude_field_from_summary( $fields, $args ) { $target_form_id = 302; // Replace 302 with ID of your form if ( $target_form_id !== (int) $args[‘form_id’] ) { return $fields; } $field_id_to_remove = 1460; // Replace 1460…Continue reading
add_filter(‘frm_csv_filename’, ‘change_csv_filename_attachment’, 10, 3); function change_csv_filename_attachment( $filename, $form, $args ) { if ( empty( $args[‘meta’] ) ) { return $filename; } $target_action_id = 158; // change 158 with the email form action ID $meta = $args[‘meta’]; if ( ! empty(…Continue reading