PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.20
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.20
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/controllers/FrmFormsController.php +17 -51 6.256.20 View file →
@@ -67,9 +67,9 @@
67 67 $data_message = __( 'Only show the fields you need and create branching forms. Upgrade to get conditional logic and question branching.', 'formidable' );
68 68 $data_message .= ' <img src="' . esc_url( $images_url ) . '/survey-logic.png" srcset="' . esc_url( $images_url ) . 'survey-logic@2x.png 2x" alt="' . esc_attr__( 'Conditional Logic options', 'formidable' ) . '"/>';
69 69 echo '<a href="javascript:void(0)" class="frm_noallow frm_show_upgrade frm_add_logic_link frm-collapsed frm-flex-justify" data-upgrade="' . esc_attr__( 'Conditional Logic options', 'formidable' ) . '" data-message="' . esc_attr( $data_message ) . '" data-medium="builder" data-content="logic">';
70 70 esc_html_e( 'Conditional Logic', 'formidable' );
71 - FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown8_icon', array( 'aria-hidden' => 'true' ) );
71 + FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown6_icon', array( 'aria-hidden' => 'true' ) );
72 72 echo '</a>';
73 73 }
74 74
75 75 /**
@@ -434,14 +434,8 @@
434 434
435 435 // print_emoji_styles is deprecated.
436 436 remove_action( 'wp_print_styles', 'print_emoji_styles' );
437 437
438 - if ( FrmTestModeController::should_add_test_mode_container() ) {
439 - do_action( 'frm_test_mode_init' );
440 - add_action( 'wp_enqueue_scripts', 'FrmTestModeController::register_and_enqueue_required_scripts' );
441 - add_filter( 'frm_filter_final_form', 'FrmTestModeController::maybe_add_test_mode_container', 99 );
442 - }
443 -
444 438 $include_theme = FrmAppHelper::get_param( 'theme', '', 'get', 'absint' );
445 439 if ( $include_theme ) {
446 440 self::set_preview_query();
447 441 self::load_theme_preview();
@@ -558,12 +552,8 @@
558 552 echo '<div class="container entry-content">';
559 553 the_content();
560 554 echo '</div>';
561 555
562 - // Prevent extra unexpected forms in the footer.
563 - // For some reason this happens in the Twenty Twenty Five theme.
564 - add_filter( 'frm_filter_final_form', '__return_empty_string' );
565 -
566 556 self::get_template( 'footer' );
567 557 }
568 558 }
569 559
@@ -1149,16 +1139,14 @@
1149 1139 * @param array<string,string> $columns
1150 1140 * @return array<string,string>
1151 1141 */
1152 1142 public static function get_columns( $columns ) {
1153 - $columns['cb'] = '<input type="checkbox" />';
1154 - $columns['name'] = esc_html__( 'Form Title', 'formidable' );
1155 - $columns['entries'] = esc_html__( 'Entries', 'formidable' );
1156 - $columns['id'] = 'ID';
1157 - $columns['form_key'] = esc_html__( 'Key', 'formidable' );
1158 - if ( 'trash' !== FrmAppHelper::simple_get( 'form_type' ) ) {
1159 - $columns['shortcode'] = esc_html__( 'Actions', 'formidable' );
1160 - }
1143 + $columns['cb'] = '<input type="checkbox" />';
1144 + $columns['name'] = esc_html__( 'Form Title', 'formidable' );
1145 + $columns['entries'] = esc_html__( 'Entries', 'formidable' );
1146 + $columns['id'] = 'ID';
1147 + $columns['form_key'] = esc_html__( 'Key', 'formidable' );
1148 + $columns['shortcode'] = esc_html__( 'Actions', 'formidable' );
1161 1149 $columns['created_at'] = esc_html__( 'Date', 'formidable' );
1162 1150
1163 1151 add_screen_option(
1164 1152 'per_page',
@@ -1416,9 +1404,9 @@
1416 1404 $sections = array(
1417 1405 'advanced' => array(
1418 1406 'name' => __( 'General', 'formidable' ),
1419 1407 'title' => __( 'General Form Settings', 'formidable' ),
1420 - 'function' => array( self::class, 'advanced_settings' ),
1408 + 'function' => array( __CLASS__, 'advanced_settings' ),
1421 1409 'icon' => 'frm_icon_font frm_settings_icon',
1422 1410 ),
1423 1411 'email' => array(
1424 1412 'name' => __( 'Actions & Notifications', 'formidable' ),
@@ -1448,9 +1436,9 @@
1448 1436 ),
1449 1437 ),
1450 1438 'buttons' => array(
1451 1439 'name' => __( 'Buttons', 'formidable' ),
1452 - 'class' => self::class,
1440 + 'class' => __CLASS__,
1453 1441 'function' => 'buttons_settings',
1454 1442 'icon' => 'frm_icon_font frm_button_icon',
1455 1443 ),
1456 1444 'landing' => array(
@@ -1486,9 +1474,9 @@
1486 1474 ),
1487 1475 ),
1488 1476 'html' => array(
1489 1477 'name' => __( 'Customize HTML', 'formidable' ),
1490 - 'class' => self::class,
1478 + 'class' => __CLASS__,
1491 1479 'function' => 'html_settings',
1492 1480 'icon' => 'frm_icon_font frm_code_icon',
1493 1481 ),
1494 1482 );
@@ -1552,9 +1540,9 @@
1552 1540 public static function render_spam_settings( $values ) {
1553 1541 if ( function_exists( 'akismet_http_post' ) ) {
1554 1542 include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/spam-settings/akismet.php';
1555 1543 }
1556 - include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/spam-settings/stopforumspam.php';
1544 + include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/spam-settings/honeypot.php';
1557 1545 include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/spam-settings/antispam.php';
1558 1546 }
1559 1547
1560 1548 /**
@@ -2055,32 +2043,12 @@
2055 2043 // Get posted data
2056 2044 $form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
2057 2045 $name = FrmAppHelper::get_post_param( 'form_name', '', 'sanitize_text_field' );
2058 2046
2059 - $form = FrmForm::getOne( $form_id );
2060 - if ( ! $form ) {
2061 - wp_send_json_error( __( 'Form not found', 'formidable' ) );
2062 - }
2047 + // Update the form name and form key.
2048 + $form_key = FrmAppHelper::get_unique_key( sanitize_title( $name ), 'frm_forms', 'form_key' );
2049 + FrmForm::update( $form_id, compact( 'name', 'form_key' ) );
2063 2050
2064 - if ( $name === $form->name ) {
2065 - // Nothing to change so exit early.
2066 - wp_send_json_success();
2067 - }
2068 -
2069 - $to_update = array(
2070 - 'name' => $name,
2071 - );
2072 -
2073 - if ( '' !== $name ) {
2074 - // Only update form_key if name is not empty.
2075 - $form_key = FrmAppHelper::get_unique_key( sanitize_title( $name ), 'frm_forms', 'form_key' );
2076 - $to_update['form_key'] = $form_key;
2077 - } else {
2078 - $form_key = $form->form_key;
2079 - }
2080 -
2081 - FrmForm::update( $form_id, $to_update );
2082 -
2083 2051 wp_send_json_success( compact( 'form_key' ) );
2084 2052 }
2085 2053
2086 2054 public static function json_error( $errors ) {
@@ -3051,9 +3019,9 @@
3051 3019
3052 3020 $include_form_tag = apply_filters( 'frm_include_form_tag', true, $form );
3053 3021
3054 3022 $frm_settings = FrmAppHelper::get_settings();
3055 - $submit = $form->options['submit_value'] ?? $frm_settings->submit_value;
3023 + $submit = isset( $form->options['submit_value'] ) ? $form->options['submit_value'] : $frm_settings->submit_value;
3056 3024
3057 3025 global $frm_vars;
3058 3026 self::maybe_load_css( $form, $values['custom_style'], $frm_vars['load_css'] );
3059 3027
@@ -3141,12 +3109,12 @@
3141 3109 * @return string
3142 3110 */
3143 3111 private static function prepare_submit_message( $form, $entry_id, $args = array() ) {
3144 3112 $frm_settings = FrmAppHelper::get_settings( array( 'current_form' => $form->id ) );
3145 - $opt = $args['success_opt'] ?? 'success';
3113 + $opt = isset( $args['success_opt'] ) ? $args['success_opt'] : 'success';
3146 3114
3147 3115 if ( $entry_id && is_numeric( $entry_id ) ) {
3148 - $message = $form->options[ $opt . '_msg' ] ?? $frm_settings->success_msg;
3116 + $message = isset( $form->options[ $opt . '_msg' ] ) ? $form->options[ $opt . '_msg' ] : $frm_settings->success_msg;
3149 3117 $class = 'frm_message';
3150 3118 } else {
3151 3119 $message = $frm_settings->failed_msg;
3152 3120 $class = FrmFormsHelper::form_error_class();
@@ -3250,10 +3218,8 @@
3250 3218
3251 3219 if ( ! FrmAppHelper::is_admin() && $location !== 'header' && ! empty( $frm_vars['forms_loaded'] ) ) {
3252 3220 // load formidable js
3253 3221 wp_enqueue_script( 'formidable' );
3254 -
3255 - FrmHoneypot::maybe_print_honeypot_js();
3256 3222 }
3257 3223 }
3258 3224
3259 3225 /**