From b8282aa54af1baa2dc058130121a68277ecf0a20 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Mon, 26 Jan 2026 13:38:37 -0400 Subject: [PATCH 01/13] Replace phpcs exceptions with phpcs disable comments wrapped around inline HTML --- classes/controllers/FrmAddonsController.php | 2 + classes/controllers/FrmAppController.php | 2 + classes/controllers/FrmFormsController.php | 2 + classes/controllers/FrmSMTPController.php | 6 +++ classes/controllers/FrmStylesController.php | 2 + .../controllers/FrmWelcomeTourController.php | 2 + classes/helpers/FrmAddonsHelper.php | 6 +++ classes/helpers/FrmAppHelper.php | 7 +++ classes/helpers/FrmDashboardHelper.php | 2 + classes/helpers/FrmEntriesHelper.php | 2 + classes/helpers/FrmEntriesListHelper.php | 2 + classes/helpers/FrmFieldsHelper.php | 2 + classes/helpers/FrmFormMigratorsHelper.php | 4 ++ classes/helpers/FrmFormTemplatesHelper.php | 2 + classes/helpers/FrmFormsHelper.php | 4 ++ classes/helpers/FrmFormsListHelper.php | 4 ++ classes/helpers/FrmHtmlHelper.php | 2 + classes/helpers/FrmListHelper.php | 7 +++ classes/helpers/FrmOnSubmitHelper.php | 4 ++ classes/helpers/FrmStylesCardHelper.php | 8 ++++ classes/helpers/FrmStylesHelper.php | 4 ++ classes/helpers/FrmTipsHelper.php | 2 + classes/models/FrmFormAction.php | 2 + classes/models/FrmFormMigrator.php | 2 + classes/models/FrmHoneypot.php | 2 + classes/models/FrmSalesApi.php | 2 + classes/models/FrmSolution.php | 7 +++ classes/models/fields/FrmFieldName.php | 2 + classes/models/fields/FrmFieldPhone.php | 2 + classes/models/fields/FrmFieldType.php | 4 ++ classes/widgets/FrmShowForm.php | 2 + phpcs.xml | 47 ------------------- square/helpers/FrmSquareLiteConnectHelper.php | 4 ++ .../FrmTransLitePaymentsController.php | 2 + stripe/helpers/FrmStrpLiteAppHelper.php | 2 + stripe/helpers/FrmStrpLiteConnectHelper.php | 4 ++ stripe/helpers/FrmTransLiteAppHelper.php | 2 + stripe/models/FrmTransLiteAction.php | 2 + 38 files changed, 119 insertions(+), 47 deletions(-) diff --git a/classes/controllers/FrmAddonsController.php b/classes/controllers/FrmAddonsController.php index ba75000939..a45e3ba0be 100644 --- a/classes/controllers/FrmAddonsController.php +++ b/classes/controllers/FrmAddonsController.php @@ -1493,11 +1493,13 @@ public static function addon_upgrade_link( $addon, $upgrade_link ) { if ( ! str_contains( $class, 'frm-button' ) ) { $class .= ' frm-button-secondary frm-button-sm'; } + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
@@ -168,6 +169,7 @@ protected function output_section_heading() {

id; + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
$link ) { $attrs = $button_attrs + array( 'data-tracking-value' => $key ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?> >

@@ -140,6 +141,7 @@ public static function get_reconnect_link() {

@@ -1635,10 +1638,12 @@ public static function print_admin_banner( $should_show_lite_upgrade ) { esc_html( $cta_text ), '' ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
'spam-protection', 'content' => 'entries-list-spam-protection', ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

@@ -264,6 +265,7 @@ protected function display_tablenav( $which ) {

  • >
  • @@ -134,6 +135,7 @@ private static function install_banner( $install ) {
    @@ -172,6 +175,7 @@ private static function install_button( $install, $label = '' ) { 'vertical', ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
    @@ -232,6 +235,7 @@ public static function form_switcher( $selected = false ) { // phpcs:ignore Slev
    status === 'trash' ) { echo '

    '; esc_html_e( 'No forms found in the trash.', 'formidable' ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?> '; } else { $title = __( 'No Forms Found', 'formidable' ); @@ -170,11 +172,13 @@ public function extra_tablenav( $which ) { } if ( 'trash' === $this->status && current_user_can( 'frm_delete_forms' ) ) { + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

    /> @@ -128,5 +129,6 @@ public static function echo_unit_input( $args = array() ) {
    @@ -552,6 +553,7 @@ protected function view_switcher( $current_mode ) { ?>
    screen->render_screen_reader_content( 'heading_list' ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?> has_min_items( 1 ) ) { ?> @@ -1098,6 +1101,8 @@ public function display( $args = array() ) {
    should_display( $args, 'display-bottom-nav' ) ) { $this->display_tablenav( 'bottom' ); } @@ -1145,6 +1150,7 @@ protected function display_tablenav( $which ) { // Don't show the bulk actions when there aren't many rows. return; } + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
    @@ -1159,6 +1165,7 @@ protected function display_tablenav( $which ) {
    get_field_id( 'success_msg' ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
    get_field_name( 'success_page_id' ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
    @@ -127,6 +130,7 @@ public static function show_page_settings( $args ) { ?>
    > echo_template_cards( $styles ); } else { $this->echo_custom_cards( $styles ); } + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
    class="frm_pro_tip frm-gradient"> @@ -71,6 +72,7 @@ public static function show_tip( $tip, $html = '' ) { '; diff --git a/classes/models/FrmFormAction.php b/classes/models/FrmFormAction.php index b10ff4ff9a..ef6a878fd0 100644 --- a/classes/models/FrmFormAction.php +++ b/classes/models/FrmFormAction.php @@ -997,6 +997,7 @@ public static function trigger_labels() { * @return void */ public function render_conditional_logic_call_to_action() { + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

    @@ -1004,6 +1005,7 @@ public function render_conditional_logic_call_to_action() {

    get_forms(); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

    name ); ?> Importer

    @@ -167,6 +168,7 @@ public function import_page() {
    track_html_id( $container_id ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
    >
    @@ -458,6 +459,7 @@ public static function maybe_show_banner() { >
    90, ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
    @@ -305,12 +306,14 @@ protected function header() { 'style' => 'width:90px;height:90px;', ) ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

    page_title() ); ?>

    page_description() ); ?>

    field ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

    field_choices_heading_attrs( $args ); ?>>

    false, ); $instance = wp_parse_args( $instance, $defaults ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

    views/* - - helpers/FrmEntriesHelper.php - stripe/models/FrmTransLiteAction.php - classes/controllers/FrmAddonsController.php - classes/helpers/FrmAddonsHelper.php - classes/models/FrmDb.php - classes/helpers/FrmTipsHelper.php - classes/helpers/FrmOnSubmitHelper.php - classes/models/FrmSalesApi.php - stripe/controllers/FrmTransLitePaymentsController.php - classes/helpers/FrmStylesCardHelper.php - classes/controllers/FrmAppController.php - classes/models/FrmEntryValidate.php - classes/helpers/FrmEntriesListHelper.php - classes/controllers/FrmWelcomeTourController.php - classes/helpers/FrmDashboardHelper.php - stripe/helpers/FrmStrpLiteAppHelper.php - classes/helpers/FrmFormsListHelper.php - classes/models/FrmField.php - classes/helpers/FrmFormsHelper.php - classes/controllers/FrmSMTPController.php - stripe/helpers/FrmStrpLiteConnectHelper.php - classes/models/FrmHoneypot.php - stripe/helpers/FrmTransLiteAppHelper.php - classes/models/fields/FrmFieldType.php - classes/controllers/FrmStylesController.php - stripe/helpers/FrmTransLiteListHelper.php - classes/models/FrmSolution.php - classes/helpers/FrmFieldsHelper.php - classes/models/fields/FrmFieldTextarea.php - classes/models/FrmPluginSearch.php - classes/models/fields/FrmFieldPhone.php - classes/helpers/FrmStylesHelper.php - classes/models/fields/FrmFieldName.php - classes/helpers/FrmListHelper.php - classes/helpers/FrmFormTemplatesHelper.php - classes/models/FrmFormAction.php - classes/helpers/FrmHtmlHelper.php - classes/helpers/FrmFormMigratorsHelper.php - classes/controllers/FrmFormsController.php - classes/helpers/FrmCssScopeHelper.php - classes/models/FrmFormMigrator.php - classes/controllers/FrmFieldsController.php - classes/models/FrmEntryMeta.php - classes/helpers/FrmAppHelper.php - classes/widgets/FrmShowForm.php - square/helpers/FrmSquareLiteConnectHelper.php diff --git a/square/helpers/FrmSquareLiteConnectHelper.php b/square/helpers/FrmSquareLiteConnectHelper.php index ab8296056c..68e10b27db 100644 --- a/square/helpers/FrmSquareLiteConnectHelper.php +++ b/square/helpers/FrmSquareLiteConnectHelper.php @@ -24,6 +24,7 @@ public static function render_settings_container() { FrmSquareLiteAppHelper::fee_education( 'square-global-settings-tip' ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?> @@ -59,6 +60,7 @@ public static function render_settings_container() {
    @@ -115,6 +118,7 @@ private static function render_settings_for_mode( $mode ) {
    item_id ); ?>
    'width:24px' ) ); ?> @@ -148,6 +149,7 @@ public static function not_connected_warning() {
    Date: Mon, 26 Jan 2026 13:45:17 -0400 Subject: [PATCH 02/13] Put back some exceptions for now, fix issues in frmapphelper --- classes/helpers/FrmAppHelper.php | 54 +++++++++++++++++--------------- phpcs.xml | 18 +++++++++++ 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index 931fcb6b23..7e0121bb38 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -853,9 +853,8 @@ public static function get_simple_request( $args ) { } } } elseif ( isset( $_REQUEST[ $args['param'] ] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized - $value = wp_unslash( $_REQUEST[ $args['param'] ] ); + // phpcs:ignore phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + $value = wp_unslash( $_REQUEST[ $args['param'] ] ); } self::sanitize_value( $args['sanitize'], $value ); @@ -1954,6 +1953,7 @@ public static function maybe_autocomplete_options( $args ) { $html_attrs['id'] = $args['id']; } + // phpcs:disable Generic.WhiteSpace.ScopeIndent if ( count( $args['source'] ) <= $args['dropdown_limit'] ) { ?> @@ -2114,9 +2115,7 @@ public static function post_edit_link( $post_id ) { * @return bool */ public static function is_full_screen() { - return self::is_form_builder_page() || - self::is_style_editor_page() || - self::is_full_screen_view_builder_page(); + return self::is_form_builder_page() || self::is_style_editor_page() || self::is_full_screen_view_builder_page(); } /** @@ -2169,9 +2168,9 @@ private static function is_full_screen_view_builder_page() { public static function wp_roles_dropdown( $field_name, $capability, $multiple = 'single' ) { ?> field_options['custom_field'] = ''; } - $meta_value = FrmProEntryMetaHelper::get_post_value( - $record->post_id, - $field->field_options['post_field'], - $field->field_options['custom_field'], - array( - 'truncate' => false, - 'type' => $field->type, - 'form_id' => $field->form_id, - 'field' => $field, - ) - ); + $meta_value = FrmProEntryMetaHelper::get_post_value( + $record->post_id, + $field->field_options['post_field'], + $field->field_options['custom_field'], + array( + 'truncate' => false, + 'type' => $field->type, + 'form_id' => $field->form_id, + 'field' => $field, + ) + ); } else { $meta_value = FrmEntryMeta::get_meta_value( $record, $field->id ); }//end if @@ -4032,8 +4031,8 @@ public static function min_version_notice( $min_version ) { $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); echo ''; + esc_html__( 'You are running an outdated version of Formidable. This plugin may not work correctly if you do not update Formidable.', 'formidable' ) . + ''; } /** @@ -4089,6 +4088,7 @@ private static function php_version_notice() { $message[] = __( 'The version of PHP on your server is too low. If this is not corrected, you may see issues with Formidable Forms. Please contact your web host and ask to be updated to PHP 7.0+.', 'formidable' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong } + // phpcs:disable Generic.WhiteSpace.ScopeIndent foreach ( $message as $m ) { ?>
    @@ -4096,6 +4096,7 @@ private static function php_version_notice() {
    > - + $msg ) { ?> - + views/* + classes/controllers/FrmAppController.php + classes/models/FrmEntryValidate.php + classes/models/fields/FrmFieldTextarea.php + classes/models/FrmField.php + classes/models/FrmEntryMeta.php + classes/controllers/FrmFormsController.php + classes/controllers/FrmFieldsController.php + classes/helpers/FrmStylesCardHelper.php + classes/helpers/FrmFormsListHelper.php + classes/helpers/FrmFieldsHelper.php + stripe/helpers/FrmTransLiteAppHelper.php + classes/helpers/FrmStylesHelper.php + stripe/helpers/FrmTransLiteListHelper.php + classes/helpers/FrmFormTemplatesHelper.php + classes/helpers/FrmCssScopeHelper.php + classes/models/FrmSolution.php + classes/models/FrmPluginSearch.php + classes/helpers/FrmFormsHelper.php From 7758b8a4976ca592589a11cf9e18c9e65bfc3fd6 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Mon, 26 Jan 2026 13:49:34 -0400 Subject: [PATCH 03/13] Clean up some changes --- classes/controllers/FrmAppController.php | 10 ++-------- classes/models/FrmEntryMeta.php | 2 ++ classes/models/FrmField.php | 14 ++++---------- phpcs.xml | 4 +--- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/classes/controllers/FrmAppController.php b/classes/controllers/FrmAppController.php index 94ed7f2ac5..1d96c5d7ac 100644 --- a/classes/controllers/FrmAppController.php +++ b/classes/controllers/FrmAppController.php @@ -912,10 +912,7 @@ private static function should_show_floating_links() { return false; } - $should_show = FrmAppHelper::is_formidable_admin() && - ! FrmAppHelper::is_style_editor_page() && - ! FrmAppHelper::is_admin_page( 'formidable-views-editor' ) && - ! FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ); + $should_show = FrmAppHelper::is_formidable_admin() && ! FrmAppHelper::is_style_editor_page() && ! FrmAppHelper::is_admin_page( 'formidable-views-editor' ) && ! FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ); /** * Filters whether the floating links should be displayed. @@ -1639,10 +1636,7 @@ private static function is_our_callback_string( $callback_name ) { * @return bool */ private static function is_our_callback_array( $callback ) { - return ! empty( $callback['function'] ) && - is_array( $callback['function'] ) && - ! empty( $callback['function'][0] ) && - self::is_our_callback_string( is_object( $callback['function'][0] ) ? get_class( $callback['function'][0] ) : $callback['function'][0] ); + return ! empty( $callback['function'] ) && is_array( $callback['function'] ) && ! empty( $callback['function'][0] ) && self::is_our_callback_string( is_object( $callback['function'][0] ) ? get_class( $callback['function'][0] ) : $callback['function'][0] ); } /** diff --git a/classes/models/FrmEntryMeta.php b/classes/models/FrmEntryMeta.php index be544352fd..5f87cee1b8 100644 --- a/classes/models/FrmEntryMeta.php +++ b/classes/models/FrmEntryMeta.php @@ -387,10 +387,12 @@ public static function get_entry_meta_info( $entry_id ) { */ public static function getAll( $where = array(), $order_by = '', $limit = '', $stripslashes = false ) { global $wpdb; + // phpcs:disable Generic.WhiteSpace.ScopeIndent $query = 'SELECT it.*, fi.type as field_type, fi.field_key as field_key, fi.required as required, fi.form_id as field_form_id, fi.name as field_name, fi.options as fi_options FROM ' . $wpdb->prefix . 'frm_item_metas it LEFT OUTER JOIN ' . $wpdb->prefix . 'frm_fields fi ON it.field_id=fi.id' . FrmDb::prepend_and_or_where( ' WHERE ', $where ) . $order_by . $limit; + // phpcs:enable Generic.WhiteSpace.ScopeIndent $cache_key = 'all_' . FrmAppHelper::maybe_json_encode( $where ) . $order_by . $limit; $results = FrmDb::check_cache( $cache_key, 'frm_entry', $query, ( $limit === ' LIMIT 1' ? 'get_row' : 'get_results' ) ); diff --git a/classes/models/FrmField.php b/classes/models/FrmField.php index 2cde473ad6..087fc3fe17 100644 --- a/classes/models/FrmField.php +++ b/classes/models/FrmField.php @@ -1306,9 +1306,7 @@ public static function is_field_with_multiple_values( $field ) { $field_type = self::get_original_field_type( $field ); - return self::is_checkbox( $field ) || - $field_type === 'address' || - self::is_multiple_select( $field ); + return self::is_checkbox( $field ) || $field_type === 'address' || self::is_multiple_select( $field ); } /** @@ -1587,13 +1585,9 @@ public static function is_checkbox( $field ) { * @return bool true if field type is checkbox or Dynamic checkbox */ public static function is_field_type( $field, $is_type ) { - $field_type = self::get_original_field_type( $field ); - $data_type = self::get_option( $field, 'data_type' ); - - $is_field_type = $is_type === $field_type || - ( 'data' === $field_type && $is_type === $data_type ) || - ( 'lookup' === $field_type && $is_type === $data_type ) || - ( 'product' === $field_type && $is_type === $data_type ); + $field_type = self::get_original_field_type( $field ); + $data_type = self::get_option( $field, 'data_type' ); + $is_field_type = $is_type === $field_type || ( 'data' === $field_type && $is_type === $data_type ) || ( 'lookup' === $field_type && $is_type === $data_type ) || ( 'product' === $field_type && $is_type === $data_type ); /** * When a field type is checked, allow individual fields diff --git a/phpcs.xml b/phpcs.xml index 71a67f6ce3..2b937ade3d 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -236,11 +236,9 @@ views/* - classes/controllers/FrmAppController.php classes/models/FrmEntryValidate.php classes/models/fields/FrmFieldTextarea.php - classes/models/FrmField.php - classes/models/FrmEntryMeta.php + classes/controllers/FrmFormsController.php classes/controllers/FrmFieldsController.php classes/helpers/FrmStylesCardHelper.php From 3b716fa6e4a9aa1c92e5f8b5fae62ba1e08b243d Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Mon, 26 Jan 2026 13:51:42 -0400 Subject: [PATCH 04/13] Add comments for long lines --- classes/controllers/FrmAppController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/controllers/FrmAppController.php b/classes/controllers/FrmAppController.php index 1d96c5d7ac..efdea330cc 100644 --- a/classes/controllers/FrmAppController.php +++ b/classes/controllers/FrmAppController.php @@ -912,7 +912,7 @@ private static function should_show_floating_links() { return false; } - $should_show = FrmAppHelper::is_formidable_admin() && ! FrmAppHelper::is_style_editor_page() && ! FrmAppHelper::is_admin_page( 'formidable-views-editor' ) && ! FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ); + $should_show = FrmAppHelper::is_formidable_admin() && ! FrmAppHelper::is_style_editor_page() && ! FrmAppHelper::is_admin_page( 'formidable-views-editor' ) && ! FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong /** * Filters whether the floating links should be displayed. @@ -1636,7 +1636,7 @@ private static function is_our_callback_string( $callback_name ) { * @return bool */ private static function is_our_callback_array( $callback ) { - return ! empty( $callback['function'] ) && is_array( $callback['function'] ) && ! empty( $callback['function'][0] ) && self::is_our_callback_string( is_object( $callback['function'][0] ) ? get_class( $callback['function'][0] ) : $callback['function'][0] ); + return ! empty( $callback['function'] ) && is_array( $callback['function'] ) && ! empty( $callback['function'][0] ) && self::is_our_callback_string( is_object( $callback['function'][0] ) ? get_class( $callback['function'][0] ) : $callback['function'][0] ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong } /** From 638327cece4dea0d43be0af91151e1e62b14082d Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Mon, 26 Jan 2026 13:51:54 -0400 Subject: [PATCH 05/13] Add comments for long lines --- classes/models/FrmField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/models/FrmField.php b/classes/models/FrmField.php index 087fc3fe17..18559bb096 100644 --- a/classes/models/FrmField.php +++ b/classes/models/FrmField.php @@ -1587,7 +1587,7 @@ public static function is_checkbox( $field ) { public static function is_field_type( $field, $is_type ) { $field_type = self::get_original_field_type( $field ); $data_type = self::get_option( $field, 'data_type' ); - $is_field_type = $is_type === $field_type || ( 'data' === $field_type && $is_type === $data_type ) || ( 'lookup' === $field_type && $is_type === $data_type ) || ( 'product' === $field_type && $is_type === $data_type ); + $is_field_type = $is_type === $field_type || ( 'data' === $field_type && $is_type === $data_type ) || ( 'lookup' === $field_type && $is_type === $data_type ) || ( 'product' === $field_type && $is_type === $data_type ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong /** * When a field type is checked, allow individual fields From 4a82f82ad41e3fe1c7ac0c166ce6d3d90f7c80a8 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Mon, 26 Jan 2026 13:52:20 -0400 Subject: [PATCH 06/13] Revert indentation change --- classes/helpers/FrmAppHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index 7e0121bb38..ddf34189a7 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -4963,7 +4963,7 @@ public static function print_setting_error( $args ) { if ( is_array( $args['errors'] ) ) { foreach ( $args['errors'] as $key => $msg ) { ?> - + Date: Mon, 26 Jan 2026 13:53:41 -0400 Subject: [PATCH 07/13] Fix indentation issues --- classes/helpers/FrmAppHelper.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index ddf34189a7..2bd61dde25 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -2166,13 +2166,15 @@ private static function is_full_screen_view_builder_page() { * @param string $multiple 'single' and 'multiple'. */ public static function wp_roles_dropdown( $field_name, $capability, $multiple = 'single' ) { + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?> > - + Date: Mon, 26 Jan 2026 13:56:15 -0400 Subject: [PATCH 08/13] Fix indentation issues --- classes/helpers/FrmStylesCardHelper.php | 4 ---- classes/models/FrmSolution.php | 1 - 2 files changed, 5 deletions(-) diff --git a/classes/helpers/FrmStylesCardHelper.php b/classes/helpers/FrmStylesCardHelper.php index 2ffb4df47b..48dfd00671 100644 --- a/classes/helpers/FrmStylesCardHelper.php +++ b/classes/helpers/FrmStylesCardHelper.php @@ -360,13 +360,11 @@ public function echo_card_wrapper( $id, $styles ) { ?>
    > echo_template_cards( $styles ); } else { $this->echo_custom_cards( $styles ); } - // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
    diff --git a/classes/models/FrmSolution.php b/classes/models/FrmSolution.php index 4d4b6eb470..71b5670afa 100644 --- a/classes/models/FrmSolution.php +++ b/classes/models/FrmSolution.php @@ -306,7 +306,6 @@ protected function header() { 'style' => 'width:90px;height:90px;', ) ); - // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

    page_title() ); ?>

    From 4d28e0e6799cf9ab0984831efb2999d7da5631e7 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Mon, 26 Jan 2026 13:57:41 -0400 Subject: [PATCH 09/13] Fix indentation issues --- classes/helpers/FrmAppHelper.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index 2bd61dde25..146bef4c0a 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -1637,7 +1637,6 @@ public static function print_admin_banner( $should_show_lite_upgrade ) { esc_html( $cta_text ), '' ); - // phpcs:disable Generic.WhiteSpace.ScopeIndent ?> @@ -2035,9 +2034,9 @@ public static function wp_pages_dropdown( $args = array(), $page_id = '', $trunc ?> From 63fd361f03e2b7edcb93190f043502f621257b2d Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Mon, 26 Jan 2026 13:59:00 -0400 Subject: [PATCH 10/13] Fix indentation issues --- classes/helpers/FrmAppHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index 146bef4c0a..53bf43380f 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -1969,9 +1969,9 @@ public static function maybe_autocomplete_options( $args ) { Date: Mon, 26 Jan 2026 14:08:32 -0400 Subject: [PATCH 11/13] Remove the rest of the exceptions to comments --- classes/controllers/FrmFieldsController.php | 2 ++ classes/controllers/FrmFormsController.php | 2 ++ classes/helpers/FrmAppHelper.php | 2 ++ classes/helpers/FrmCssScopeHelper.php | 4 +--- classes/helpers/FrmFieldsHelper.php | 2 ++ classes/helpers/FrmFormTemplatesHelper.php | 2 ++ classes/helpers/FrmFormsHelper.php | 10 ++++++++-- classes/helpers/FrmFormsListHelper.php | 2 ++ classes/helpers/FrmStylesHelper.php | 2 ++ classes/models/FrmEntryValidate.php | 2 ++ classes/models/FrmPluginSearch.php | 2 ++ classes/models/FrmSolution.php | 10 ++++++++++ classes/models/fields/FrmFieldTextarea.php | 2 ++ phpcs.xml | 16 ---------------- stripe/helpers/FrmTransLiteAppHelper.php | 5 ++++- stripe/helpers/FrmTransLiteListHelper.php | 2 ++ 16 files changed, 45 insertions(+), 22 deletions(-) diff --git a/classes/controllers/FrmFieldsController.php b/classes/controllers/FrmFieldsController.php index 99d43c5b1e..a614fec427 100644 --- a/classes/controllers/FrmFieldsController.php +++ b/classes/controllers/FrmFieldsController.php @@ -951,12 +951,14 @@ public static function pull_custom_error_body_from_custom_html( $form, $field, $ * @return void */ private static function maybe_add_html_required( $field, array &$add_html ) { + // phpcs:disable Generic.WhiteSpace.ScopeIndent $excluded_field_types = FrmField::is_radio( $field ) || FrmField::is_checkbox( $field ) || FrmField::is_field_type( $field, 'file' ) || FrmField::is_field_type( $field, 'nps' ) || FrmField::is_field_type( $field, 'scale' ); + // phpcs:enable Generic.WhiteSpace.ScopeIndent if ( $excluded_field_types ) { return; diff --git a/classes/controllers/FrmFormsController.php b/classes/controllers/FrmFormsController.php index 4dc1886854..05f193945b 100644 --- a/classes/controllers/FrmFormsController.php +++ b/classes/controllers/FrmFormsController.php @@ -3198,9 +3198,11 @@ private static function redirect_after_submit_using_js( $args ) { private static function get_redirect_message( $success_url, $success_msg, $args ) { $success_msg = apply_filters( 'frm_content', $success_msg, $args['form'], $args['entry_id'] ); $success_msg = do_shortcode( FrmAppHelper::use_wpautop( $success_msg ) ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent $redirect_msg = '
    ' . $success_msg . '
    ' . // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong self::get_redirect_fallback_message( $success_url, $args ) . '
    '; + // phpcs:enable Generic.WhiteSpace.ScopeIndent $redirect_args = array( 'entry_id' => $args['entry_id'], diff --git a/classes/helpers/FrmAppHelper.php b/classes/helpers/FrmAppHelper.php index 53bf43380f..9851b4efe6 100644 --- a/classes/helpers/FrmAppHelper.php +++ b/classes/helpers/FrmAppHelper.php @@ -2031,6 +2031,7 @@ public static function wp_pages_dropdown( $args = array(), $page_id = '', $trunc $pages = self::get_post_ids_and_titles( $args['post_type'] ); $selected = self::get_post_param( $args['field_name'], $args['page_id'], 'absint' ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?> ' . esc_html( $label ) . '' . ''; + // phpcs:enable Generic.WhiteSpace.ScopeIndent } /** diff --git a/classes/helpers/FrmFormTemplatesHelper.php b/classes/helpers/FrmFormTemplatesHelper.php index 839ad0ecda..f88a665fff 100644 --- a/classes/helpers/FrmFormTemplatesHelper.php +++ b/classes/helpers/FrmFormTemplatesHelper.php @@ -258,9 +258,11 @@ public static function needs_get_free_templates_banner() { * @return bool */ private static function needs_free_plan( $template ) { + // phpcs:disable Generic.WhiteSpace.ScopeIndent return self::needs_get_free_templates_banner() && ! empty( $template['category_slugs'] ) && in_array( 'free', $template['category_slugs'], true ) && ! in_array( $template['id'], FrmFormTemplatesController::FREE_TEMPLATES_IDS, true ); + // phpcs:enable Generic.WhiteSpace.ScopeIndent } } diff --git a/classes/helpers/FrmFormsHelper.php b/classes/helpers/FrmFormsHelper.php index 3fae8a1ba4..805f84ef80 100644 --- a/classes/helpers/FrmFormsHelper.php +++ b/classes/helpers/FrmFormsHelper.php @@ -705,6 +705,7 @@ public static function insert_opt_html( $args ) { $truncated_name = FrmAppHelper::truncate( $args['name'], 60 ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
  • @@ -729,6 +730,7 @@ public static function insert_opt_html( $args ) {
  • '; - FrmAppHelper::icon_by_class( 'frmfont frm_' . $icon_name . '_icon' ); + FrmAppHelper::icon_by_class( 'frmfont frm_' . $icon_name . '_icon' ); echo ''; } @@ -1698,6 +1702,7 @@ public static function show_plan_required( $requires, $link ) { return; } + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

    @@ -1706,6 +1711,7 @@ public static function show_plan_required( $requires, $link ) {

    '_blank', ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent return ' ' . FrmAppHelper::icon_by_class( 'frmfont frm_eye_icon', array( 'echo' => false ) ) . ''; + // phpcs:enable Generic.WhiteSpace.ScopeIndent } /** diff --git a/classes/helpers/FrmStylesHelper.php b/classes/helpers/FrmStylesHelper.php index 93c94f0f2e..349a2fe2fc 100644 --- a/classes/helpers/FrmStylesHelper.php +++ b/classes/helpers/FrmStylesHelper.php @@ -1141,9 +1141,11 @@ public static function use_chosen_js() { return false; } + // phpcs:disable Generic.WhiteSpace.ScopeIndent return is_callable( 'FrmProAppHelper::use_chosen_js' ) ? FrmProAppHelper::use_chosen_js() : true; + // phpcs:enable Generic.WhiteSpace.ScopeIndent } /** diff --git a/classes/models/FrmEntryValidate.php b/classes/models/FrmEntryValidate.php index fdc99836f7..b7ea7684a7 100644 --- a/classes/models/FrmEntryValidate.php +++ b/classes/models/FrmEntryValidate.php @@ -586,9 +586,11 @@ public static function spam_check( $exclude, $values, &$errors ) { * @return bool */ private static function form_is_in_progress( $values ) { + // phpcs:disable Generic.WhiteSpace.ScopeIndent return FrmAppHelper::pro_is_installed() && ( isset( $values[ 'frm_page_order_' . $values['form_id'] ] ) || FrmAppHelper::get_post_param( 'frm_next_page' ) ) && FrmField::get_all_types_in_form( $values['form_id'], 'break' ); + // phpcs:enable Generic.WhiteSpace.ScopeIndent } /** diff --git a/classes/models/FrmPluginSearch.php b/classes/models/FrmPluginSearch.php index f32df98445..c54ada3604 100644 --- a/classes/models/FrmPluginSearch.php +++ b/classes/models/FrmPluginSearch.php @@ -195,9 +195,11 @@ private function get_plugin_data() { * @return string The URL with 'formidable' instead of 'frm-plugin-search'. */ public function plugin_details( $url ) { + // phpcs:disable Generic.WhiteSpace.ScopeIndent return false !== stripos( $url, 'tab=plugin-information&plugin=' . self::$slug ) ? 'plugin-install.php?tab=plugin-information&plugin=formidable&TB_iframe=true&width=600&height=550' : $url; + // phpcs:enable Generic.WhiteSpace.ScopeIndent } /** diff --git a/classes/models/FrmSolution.php b/classes/models/FrmSolution.php index 71b5670afa..9d65baba13 100644 --- a/classes/models/FrmSolution.php +++ b/classes/models/FrmSolution.php @@ -519,11 +519,13 @@ protected function license_box( $step ) { $this->step_top( $step ); if ( $step['complete'] ) { + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?> step_bottom( $step ); @@ -571,6 +575,7 @@ protected function show_app_install( $step ) { $id = $this->download_id(); $has_file = isset( $addons[ $id ] ) && isset( $addons[ $id ]['beta'] ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent if ( ! $step['current'] ) { ?> @@ -628,6 +633,7 @@ protected function show_app_install( $step ) { echo ''; } }//end if + // phpcs:enable Generic.WhiteSpace.ScopeIndent $this->step_bottom( $step ); } @@ -693,6 +699,7 @@ protected function show_page_options() { echo '

    Choose New Page Title

    '; foreach ( $pages as $page ) { + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>

    step_top( $step ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent ?>
    step_bottom( $step ); } diff --git a/classes/models/fields/FrmFieldTextarea.php b/classes/models/fields/FrmFieldTextarea.php index d735a4eec6..57c27d5575 100644 --- a/classes/models/fields/FrmFieldTextarea.php +++ b/classes/models/fields/FrmFieldTextarea.php @@ -101,9 +101,11 @@ public function front_field_input( $args, $shortcode_atts ) { $this->add_aria_description( $args, $input_html ); $rows = $this->field['max'] ? 'rows="' . esc_attr( $this->field['max'] ) . '" ' : ''; + // phpcs:disable Generic.WhiteSpace.ScopeIndent return ''; + // phpcs:enable Generic.WhiteSpace.ScopeIndent } } diff --git a/phpcs.xml b/phpcs.xml index 2b937ade3d..2dacebb2bd 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -236,22 +236,6 @@ views/* - classes/models/FrmEntryValidate.php - classes/models/fields/FrmFieldTextarea.php - - classes/controllers/FrmFormsController.php - classes/controllers/FrmFieldsController.php - classes/helpers/FrmStylesCardHelper.php - classes/helpers/FrmFormsListHelper.php - classes/helpers/FrmFieldsHelper.php - stripe/helpers/FrmTransLiteAppHelper.php - classes/helpers/FrmStylesHelper.php - stripe/helpers/FrmTransLiteListHelper.php - classes/helpers/FrmFormTemplatesHelper.php - classes/helpers/FrmCssScopeHelper.php - classes/models/FrmSolution.php - classes/models/FrmPluginSearch.php - classes/helpers/FrmFormsHelper.php diff --git a/stripe/helpers/FrmTransLiteAppHelper.php b/stripe/helpers/FrmTransLiteAppHelper.php index 3d490c1864..2bc3a2d29d 100755 --- a/stripe/helpers/FrmTransLiteAppHelper.php +++ b/stripe/helpers/FrmTransLiteAppHelper.php @@ -404,7 +404,9 @@ public static function get_user_link( $user_id ) { * @return void */ public static function show_in_table( $value, $label ) { - if ( $value ) { ?> + if ( $value ) { + // phpcs:disable Generic.WhiteSpace.ScopeIndent + ?>
    ' // translators: %1$s: Transaction type (Payments or Subscriptions), %2$s: Span start tag, %3$s: Count, %4$s: Span close tag. . sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '', number_format_i18n( $counts[ $status ] ), '' ) . ''; + // phpcs:enable Generic.WhiteSpace.ScopeIndent } unset( $status, $name ); From 7b6255436c3b2b81fdb22fb017cf6f54b13eff7a Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Mon, 26 Jan 2026 14:11:32 -0400 Subject: [PATCH 12/13] Indentation fix --- classes/controllers/FrmFormsController.php | 5 +++-- classes/helpers/FrmStylesHelper.php | 6 +----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/classes/controllers/FrmFormsController.php b/classes/controllers/FrmFormsController.php index 05f193945b..15024ecde4 100644 --- a/classes/controllers/FrmFormsController.php +++ b/classes/controllers/FrmFormsController.php @@ -3196,8 +3196,9 @@ private static function redirect_after_submit_using_js( $args ) { * @param array $args */ private static function get_redirect_message( $success_url, $success_msg, $args ) { - $success_msg = apply_filters( 'frm_content', $success_msg, $args['form'], $args['entry_id'] ); - $success_msg = do_shortcode( FrmAppHelper::use_wpautop( $success_msg ) ); + $success_msg = apply_filters( 'frm_content', $success_msg, $args['form'], $args['entry_id'] ); + $success_msg = do_shortcode( FrmAppHelper::use_wpautop( $success_msg ) ); + // phpcs:disable Generic.WhiteSpace.ScopeIndent $redirect_msg = '
    ' . $success_msg . '
    ' . // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong self::get_redirect_fallback_message( $success_url, $args ) . diff --git a/classes/helpers/FrmStylesHelper.php b/classes/helpers/FrmStylesHelper.php index 349a2fe2fc..8b234013c6 100644 --- a/classes/helpers/FrmStylesHelper.php +++ b/classes/helpers/FrmStylesHelper.php @@ -1141,11 +1141,7 @@ public static function use_chosen_js() { return false; } - // phpcs:disable Generic.WhiteSpace.ScopeIndent - return is_callable( 'FrmProAppHelper::use_chosen_js' ) - ? FrmProAppHelper::use_chosen_js() - : true; - // phpcs:enable Generic.WhiteSpace.ScopeIndent + return is_callable( 'FrmProAppHelper::use_chosen_js' ) ? FrmProAppHelper::use_chosen_js() : true; } /** From 64a08abb97b583db440de07265ae20da072e2ee4 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Mon, 26 Jan 2026 14:12:32 -0400 Subject: [PATCH 13/13] Run php cs fixer --- classes/helpers/FrmFormsHelper.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/helpers/FrmFormsHelper.php b/classes/helpers/FrmFormsHelper.php index 805f84ef80..8573d8da85 100644 --- a/classes/helpers/FrmFormsHelper.php +++ b/classes/helpers/FrmFormsHelper.php @@ -1608,6 +1608,7 @@ public static function template_icon( $categories, $atts = array() ) { // Render the icon. echo '
    @@ -626,6 +627,7 @@ public static function render_stripe_connect_settings_container() {
    ' . // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong - esc_html__( 'You are running an outdated version of Formidable. This plugin may not work correctly if you do not update Formidable.', 'formidable' ) . - '
    : @@ -412,6 +414,7 @@ public static function show_in_table( $value, $label ) {