Add new upsells in Lite for missing Pro features#2570
Add new upsells in Lite for missing Pro features#2570AbdiTolesa wants to merge 64 commits intomasterfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds Pro upsell gating to field settings: controller computes upsell flags when Pro is absent; new helper builds upsell-aware input attributes; settings view includes upsell partials (Autocomplete, Visibility, Before/After, AI upsell); UI styling dimmed via Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Admin as Admin UI (Browser)
participant Controller as FrmFieldsController
participant SettingsView as Settings View (PHP)
participant UpsellHelper as FrmSettingsUpsellHelper
participant Partials as Upsell Partials
Admin->>Controller: Request field settings
Controller->>Controller: detect Pro, compute upsell flags & build label/atts
Controller-->>SettingsView: field data + upsell flags/atts
SettingsView->>UpsellHelper: request attribute arrays (unique/read_only) if needed
UpsellHelper-->>SettingsView: attribute arrays (may include data-upgrade, disabled)
SettingsView->>Partials: include upsell partials conditionally (AI, Autocomplete, Visibility, Before/After)
Partials-->>Admin: render upsell UI blocks (dimmed inputs, upgrade prompts, AI button)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
classes/views/frm-fields/back-end/settings.php (1)
117-129: Fix incorrect upgrade message and conditionally render attribute.Line 123 has two issues:
- Incorrect message: The
data-upgradeattribute shows "Unique fields" but this is for the Read Only option. This is misleading to users.- The attribute is always rendered even when Pro is installed, similar to the Unique option above.
Apply this diff:
- <label for="frm_read_only_field_<?php echo esc_attr( $field['id'] ); ?>" class="frm_help frm-mb-0" title="<?php esc_attr_e( 'Read Only: Show this field but do not allow the field value to be edited from the front-end.', 'formidable' ); ?>" data-trigger="hover"> - <input type="checkbox" id="frm_read_only_field_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[read_only_<?php echo esc_attr( $field['id'] ); ?>]" value="1" <?php checked( $field['read_only'], 1 ); ?> - class="<?php echo esc_attr( $no_allow ); ?>" - <?php echo 'data-upgrade="' . esc_attr( ! $pro_is_installed ? __( 'Unique fields', 'formidable' ) : '' ) . '"'; ?> - /> + <label for="frm_read_only_field_<?php echo esc_attr( $field['id'] ); ?>" class="frm_help frm-mb-0" title="<?php esc_attr_e( 'Read Only: Show this field but do not allow the field value to be edited from the front-end.', 'formidable' ); ?>" data-trigger="hover"> + <input type="checkbox" id="frm_read_only_field_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[read_only_<?php echo esc_attr( $field['id'] ); ?>]" value="1" <?php checked( $field['read_only'], 1 ); ?> + class="<?php echo esc_attr( $no_allow ); ?>" + <?php + if ( ! $pro_is_installed ) { + echo 'data-upgrade="' . esc_attr( __( 'Read Only fields', 'formidable' ) ) . '"'; + } + ?> + />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
classes/controllers/FrmFieldsController.php(1 hunks)classes/views/frm-fields/back-end/settings.php(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
classes/controllers/FrmFieldsController.php (1)
classes/helpers/FrmAppHelper.php (2)
pro_is_installed(355-357)FrmAppHelper(6-4664)
classes/views/frm-fields/back-end/settings.php (1)
classes/helpers/FrmAppHelper.php (2)
pro_is_installed(355-357)checked(2271-2275)
🪛 PHPMD (2.15.0)
classes/controllers/FrmFieldsController.php
366-366: Avoid unused local variables such as '$no_allow'. (undefined)
(UnusedLocalVariable)
🔇 Additional comments (1)
classes/controllers/FrmFieldsController.php (1)
365-366: LGTM! Variables correctly prepared for the view.The variables
$pro_is_installedand$no_alloware properly defined and will be available in the included settings view. The PHPMD warning about$no_allowbeing unused is a false positive, as static analysis tools cannot track variable usage across included files.
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
js/formidable_overlay.js (2)
487-553: Consider fetching URL dynamically to avoid stale state.The module-level
urlandurlParamsare initialized once at load time. Ifwindow.locationchanges (via navigation or history manipulation), these references become stale, causing URL utility functions to operate on outdated data.Consider refactoring to fetch the URL dynamically:
-var url = new URL(window.location.href); -var urlParams = url.searchParams; +function getCurrentUrl() { + return new URL(window.location.href); +} + +function getCurrentParams() { + return getCurrentUrl().searchParams; +} var getQueryParam = function getQueryParam(paramName) { - return urlParams.get(paramName); + return getCurrentParams().get(paramName); }; var removeQueryParam = function removeQueryParam(paramName) { + var url = getCurrentUrl(); + var urlParams = url.searchParams; urlParams.delete(paramName); url.search = urlParams.toString(); return url.toString(); };Apply similar changes to
setQueryParamandhasQueryParam.
584-586: Consider extracting validation logic for clarity.The pattern
element instanceof HTMLElement || console.warn(...) || falseuses short-circuit evaluation cleverly but may be less readable than explicit conditional logic.Consider refactoring for clarity:
var isHTMLElement = function isHTMLElement(element) { - return element instanceof HTMLElement || console.warn('Invalid argument: Element must be an instance of HTMLElement') || false; + if (!(element instanceof HTMLElement)) { + console.warn('Invalid argument: Element must be an instance of HTMLElement'); + return false; + } + return true; };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
js/form-templates.js.mapis excluded by!**/*.map,!**/*.mapjs/formidable-settings-components.js.mapis excluded by!**/*.map,!**/*.mapjs/formidable_admin.js.mapis excluded by!**/*.map,!**/*.mapjs/formidable_dashboard.js.mapis excluded by!**/*.map,!**/*.mapjs/formidable_styles.js.mapis excluded by!**/*.map,!**/*.map
📒 Files selected for processing (6)
classes/views/frm-fields/back-end/settings.php(1 hunks)css/admin/frm-settings-components.css(1 hunks)css/font_icons.css(1 hunks)js/formidable_dashboard.js(1 hunks)js/formidable_overlay.js(1 hunks)resources/scss/admin/components/panel/_options-panel.scss(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- resources/scss/admin/components/panel/_options-panel.scss
- css/font_icons.css
🚧 Files skipped from review as they are similar to previous changes (1)
- classes/views/frm-fields/back-end/settings.php
🧰 Additional context used
🧬 Code graph analysis (1)
js/formidable_dashboard.js (3)
js/src/components/class-counter.js (1)
frmCounter(1-46)js/src/components/class-tabs-navigator.js (1)
frmTabsNavigator(1-135)js/src/core/utils/animation.js (1)
frmAnimate(1-76)
🪛 Biome (2.1.2)
js/formidable_dashboard.js
[error] 15-15: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 83-83: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 285-285: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 544-544: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 804-804: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/formidable_overlay.js
[error] 16-16: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 224-224: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 483-483: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
🔇 Additional comments (3)
css/admin/frm-settings-components.css (1)
1-619: This is an auto-generated file; review and edit the source SCSS instead.This CSS file is compiled from SCSS via the webpack build pipeline (indicated by the loader chain in lines 1-3 and the source map reference on line 619). Manually editing compiled CSS files can be overwritten during rebuilds.
Verify that you've made the intended changes in the source SCSS file (
resources/scss/admin/frm-settings-components.scss) rather than here. If the changes are simply a result of SCSS reformatting and regeneration, that's acceptable—but confirm the source is the system of record.js/formidable_overlay.js (2)
140-151: Verify thatoverlayData.copyis sanitized.Using
innerHTMLcan introduce XSS vulnerabilities ifoverlayData.copycontains unsanitized user input. Ensure this data is trusted or properly sanitized before rendering.
346-348: Clarify the intent of callingtaskin boththenandcatch.The pattern
.then(task).catch(task)executes the task function in both success and error cases. This seems unusual—typically,catchhandles errors differently rather than re-executing the task. Is this intentional to ensure the queue continues regardless of errors?
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
classes/views/frm-fields/back-end/settings.php (2)
110-110: Conditionally render thedata-upgradeattribute.The
data-upgradeattribute is always rendered, even when Pro is installed (resulting indata-upgrade=""). This matches the previous review feedback. Only output this attribute when Pro is not installed.Apply this diff:
- <?php echo 'data-upgrade="' . esc_attr( $pro_is_installed ? '' : __( 'Unique fields', 'formidable' ) ) . '"'; ?>/> + <?php + if ( ! $pro_is_installed ) { + echo 'data-upgrade="' . esc_attr( __( 'Unique fields', 'formidable' ) ) . '"'; + } + ?>/>
123-123: Conditionally render thedata-upgradeattribute.Same issue as the Unique field: the
data-upgradeattribute is always rendered, even when Pro is installed. Only output this attribute when Pro is not installed.Apply this diff:
- <?php echo 'data-upgrade="' . esc_attr( $pro_is_installed ? '' : __( 'Read only fields', 'formidable' ) ) . '"'; ?> + <?php + if ( ! $pro_is_installed ) { + echo 'data-upgrade="' . esc_attr( __( 'Read only fields', 'formidable' ) ) . '"'; + } + ?>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
classes/views/frm-fields/back-end/settings.php(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
classes/views/frm-fields/back-end/settings.php (1)
classes/helpers/FrmAppHelper.php (3)
pro_is_installed(355-357)FrmAppHelper(6-4664)tooltip_icon(4570-4582)
🔇 Additional comments (1)
classes/views/frm-fields/back-end/settings.php (1)
376-402: LGTM! Consistent upsell implementation.The Before/After Input upsell blocks are well-implemented with proper readonly attributes, data-upgrade attributes, and consistent styling. All output is properly escaped.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
css/admin/form-templates.css (1)
22-24: Consider additional styling for better UX.The opacity reduction effectively creates a "disabled" appearance. However, consider adding complementary styles to clarify that these elements are not interactive:
.frm_show_upgrade { opacity: .5; + cursor: not-allowed; }If the elements are truly non-interactive and shouldn't trigger any events, you might also consider:
.frm_show_upgrade { opacity: .5; cursor: not-allowed; pointer-events: none; }Note: Only add
pointer-events: noneif you don't need to capture clicks to show an upgrade modal. If JavaScript handles clicks on these elements (via thedata-upgradeattribute), omit this property.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
classes/views/form-templates/index.php(1 hunks)css/admin/form-templates.css(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
classes/views/form-templates/index.php (1)
classes/helpers/FrmAppHelper.php (4)
FrmAppHelper(6-4664)pro_is_installed(355-357)icon_by_class(1275-1312)show_pill_text(4334-4339)
🔇 Additional comments (1)
classes/views/form-templates/index.php (1)
58-65: Logic correctly prevents duplicate buttons.The conditional rendering approach is well-designed:
- When Pro is NOT installed (line 58): Shows a semi-transparent teaser button to encourage upgrades
- When Pro IS installed: The action hook at line 57 allows the Pro add-on to inject a functional button
This prevents duplicate buttons while providing an upgrade prompt to Lite users.
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (5)
js/formidable_dashboard.js (1)
73-94: Guard inbox subscription elements before attaching the click handler
initInboxassumes#frm_leave_emailand#frm-add-my-email-addressalways exist. On dashboards where these controls are missing,document.querySelector("#frm-add-my-email-address")will benull, so callingaddEventListeneron it throws and prevents the rest of the dashboard JS from running.Wrap the handler attachment in existence checks, e.g.:
- var t=document.querySelector("#frm_leave_email"); - document.querySelector("#frm-add-my-email-address").addEventListener("click",(function(){ - e.saveSubscribedEmail(t.value).then() - })) + var t = document.querySelector("#frm_leave_email"); + var btn = document.querySelector("#frm-add-my-email-address"); + if (t && btn) { + btn.addEventListener("click", function () { + e.saveSubscribedEmail(t.value).then(); + }); + }This preserves behavior where the controls exist while avoiding runtime errors when they do not.
js/formidable_overlay.js (1)
1-1: Past critical issues remain unresolved.This minified file still has the architectural issues flagged in previous reviews:
- Event handler context binding issue in
initCloseButton- Missing
formidable_domscript dependency- Missing
formidable_admin_globalscript dependencyThese must be addressed in the source files or build configuration.
classes/views/frm-fields/back-end/settings.php (3)
110-110: Conditionally render thedata-upgradeattribute.The
data-upgradeattribute is always rendered, even when Pro is installed (resulting indata-upgrade=""). Only output this attribute when$pro_is_installedis false.Apply this diff:
- <?php echo 'data-upgrade="' . esc_attr( $pro_is_installed ? '' : __( 'Unique fields', 'formidable' ) ) . '"'; ?>/> + <?php + if ( ! $pro_is_installed ) { + echo 'data-upgrade="' . esc_attr( __( 'Unique fields', 'formidable' ) ) . '"'; + } + ?>/>
352-352: Addreadonlyattribute for consistency.The Autocomplete select element is missing a
readonlyattribute, while the Visibility select on line 369 correctly includes it. Since both are upsell fields meant to be non-interactive in the Lite version, they should be consistent.Apply this diff:
- <select name="field_options[autocomplete_<?php echo absint( $field['id'] ); ?>]" id="field_options_autocomplete_<?php echo absint( $field['id'] ); ?>" data-upgrade="<?php esc_attr_e( 'Autocomplete options', 'formidable' ); ?>"> + <select readonly name="field_options[autocomplete_<?php echo absint( $field['id'] ); ?>]" id="field_options_autocomplete_<?php echo absint( $field['id'] ); ?>" data-upgrade="<?php esc_attr_e( 'Autocomplete options', 'formidable' ); ?>">
122-124: Conditionally render thedata-upgradeattribute.Similar to the Unique field above, the
data-upgradeattribute on the Read Only checkbox is always rendered, even when Pro is installed. Only output this attribute when$pro_is_installedis false.Apply this diff:
- class="<?php echo esc_attr( $no_allow ); ?>" - <?php echo 'data-upgrade="' . esc_attr( $pro_is_installed ? '' : __( 'Read only fields', 'formidable' ) ) . '"'; ?> - /> + class="<?php echo esc_attr( $no_allow ); ?>" + <?php + if ( ! $pro_is_installed ) { + echo 'data-upgrade="' . esc_attr( __( 'Read only fields', 'formidable' ) ) . '"'; + } + ?>/>
🧹 Nitpick comments (1)
css/frm_testing_mode.css (1)
2-3: Avoid duplicating the Bootstrap tooltip blockThis
/*! Bootstrap v4.6.1 */ .tooltip { … }section appears to be a second copy of the same tooltip styles already present elsewhere in this file. It adds noise, hurts maintainability, and triggers duplicate‑property warnings without changing behavior.Recommend removing this duplicate tooltip block from
frm_testing_mode.cssand keeping a single shared Bootstrap tooltip definition.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
classes/views/frm-fields/back-end/settings.php(2 hunks)css/admin/frm-settings-components.css(1 hunks)css/frm_testing_mode.css(1 hunks)js/addons-page.js(1 hunks)js/formidable-settings-components.js(1 hunks)js/formidable_blocks.js(1 hunks)js/formidable_dashboard.js(1 hunks)js/formidable_overlay.js(1 hunks)js/formidable_styles.js(1 hunks)js/frm_testing_mode.js(1 hunks)js/onboarding-wizard.js(1 hunks)js/welcome-tour.js(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- css/admin/frm-settings-components.css
🧰 Additional context used
🧬 Code graph analysis (9)
classes/views/frm-fields/back-end/settings.php (1)
classes/helpers/FrmAppHelper.php (3)
pro_is_installed(355-357)FrmAppHelper(6-4666)tooltip_icon(4561-4573)
js/formidable_dashboard.js (1)
js/src/admin/admin.js (43)
e(8207-8207)t(692-692)t(717-717)t(8988-8988)t(10174-10174)i(438-438)i(1771-1771)i(2249-2249)i(2993-2993)i(3008-3008)i(3080-3080)i(3098-3098)i(3112-3115)i(3138-3146)i(3176-3176)i(3185-3185)i(3446-3452)i(3588-3591)i(5413-5413)i(5482-5483)i(5557-5559)frmDom(239-239)frmDom(240-240)frmDom(241-241)a(3056-3056)s(274-274)s(8213-8213)s(8964-8964)s(9041-9041)c(697-697)c(722-722)c(7245-7245)c(9064-9064)f(9003-9003)v(3352-3352)v(3372-3372)v(6882-6882)v(7249-7249)v(7800-7800)v(7816-7816)v(7832-7832)p(8149-8149)p(8164-8164)
js/frm_testing_mode.js (2)
js/src/admin/addon-state.js (2)
a(200-200)frmDom(3-3)js/src/frm_testing_mode.js (1)
frmDom(34-34)
js/addons-page.js (1)
js/src/admin/admin.js (45)
t(692-692)t(717-717)t(8988-8988)t(10174-10174)e(8207-8207)i(438-438)i(1771-1771)i(2249-2249)i(2993-2993)i(3008-3008)i(3080-3080)i(3098-3098)i(3112-3115)i(3138-3146)i(3176-3176)i(3185-3185)i(3446-3452)i(3588-3591)i(5413-5413)i(5482-5483)i(5557-5559)a(3056-3056)c(697-697)c(722-722)c(7245-7245)c(9064-9064)s(274-274)s(8213-8213)s(8964-8964)s(9041-9041)f(9003-9003)p(8149-8149)p(8164-8164)frmDom(239-239)frmDom(240-240)frmDom(241-241)v(3352-3352)v(3372-3372)v(6882-6882)v(7249-7249)v(7800-7800)v(7816-7816)v(7832-7832)w(9537-9537)wp(258-258)
js/formidable_blocks.js (1)
js/src/admin/addon-state.js (2)
a(200-200)ajaxurl(12-12)
js/formidable_overlay.js (2)
js/src/admin/admin.js (41)
e(8207-8207)t(692-692)t(717-717)t(8988-8988)t(10174-10174)frmDom(239-239)frmDom(240-240)frmDom(241-241)a(3056-3056)i(438-438)i(1771-1771)i(2249-2249)i(2993-2993)i(3008-3008)i(3080-3080)i(3098-3098)i(3112-3115)i(3138-3146)i(3176-3176)i(3185-3185)i(3446-3452)i(3588-3591)i(5413-5413)i(5482-5483)i(5557-5559)c(697-697)c(722-722)c(7245-7245)c(9064-9064)s(274-274)s(8213-8213)s(8964-8964)s(9041-9041)f(9003-9003)v(3352-3352)v(3372-3372)v(6882-6882)v(7249-7249)v(7800-7800)v(7816-7816)v(7832-7832)js/src/admin/addon-state.js (2)
frmDom(3-3)a(200-200)
js/formidable_styles.js (1)
js/src/admin/admin.js (45)
t(692-692)t(717-717)t(8988-8988)t(10174-10174)e(8207-8207)i(438-438)i(1771-1771)i(2249-2249)i(2993-2993)i(3008-3008)i(3080-3080)i(3098-3098)i(3112-3115)i(3138-3146)i(3176-3176)i(3185-3185)i(3446-3452)i(3588-3591)i(5413-5413)i(5482-5483)i(5557-5559)a(3056-3056)s(274-274)s(8213-8213)s(8964-8964)s(9041-9041)c(697-697)c(722-722)c(7245-7245)c(9064-9064)f(9003-9003)p(8149-8149)p(8164-8164)v(3352-3352)v(3372-3372)v(6882-6882)v(7249-7249)v(7800-7800)v(7816-7816)v(7832-7832)w(9537-9537)frmDom(239-239)frmDom(240-240)frmDom(241-241)wp(258-258)
js/onboarding-wizard.js (2)
js/src/admin/admin.js (44)
t(692-692)t(717-717)t(8988-8988)t(10174-10174)e(8207-8207)i(438-438)i(1771-1771)i(2249-2249)i(2993-2993)i(3008-3008)i(3080-3080)i(3098-3098)i(3112-3115)i(3138-3146)i(3176-3176)i(3185-3185)i(3446-3452)i(3588-3591)i(5413-5413)i(5482-5483)i(5557-5559)frmDom(239-239)frmDom(240-240)frmDom(241-241)a(3056-3056)c(697-697)c(722-722)c(7245-7245)c(9064-9064)s(274-274)s(8213-8213)s(8964-8964)s(9041-9041)f(9003-9003)p(8149-8149)p(8164-8164)v(3352-3352)v(3372-3372)v(6882-6882)v(7249-7249)v(7800-7800)v(7816-7816)v(7832-7832)w(9537-9537)js/src/admin/addon-state.js (3)
frmDom(3-3)a(200-200)ajaxurl(12-12)
js/welcome-tour.js (1)
js/src/welcome-tour/ui/spotlight.js (1)
getComputedStyle(123-123)
🪛 Biome (2.1.2)
css/frm_testing_mode.css
[error] 3-3: Unexpected shorthand property background after background-color
(lint/suspicious/noShorthandPropertyOverrides)
[error] 3-3: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.
text-align is already defined here.
Remove or rename the duplicate property to ensure consistent styling.
(lint/suspicious/noDuplicateProperties)
[error] 3-3: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.
border-radius is already defined here.
Remove or rename the duplicate property to ensure consistent styling.
(lint/suspicious/noDuplicateProperties)
js/formidable_dashboard.js
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/frm_testing_mode.js
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: Do not use the t variable name as a label
The variable is declared here
Creating a label with the same name as an in-scope variable leads to confusion.
(lint/suspicious/noLabelVar)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/addons-page.js
[error] 1-1: Unsafe usage of 'throw'.
'throw' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.
(lint/correctness/noUnsafeFinally)
[error] 1-1: Unsafe usage of 'return'.
'return' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.
(lint/correctness/noUnsafeFinally)
[error] 1-1: Unsafe usage of 'throw'.
'throw' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.
(lint/correctness/noUnsafeFinally)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: Do not use the t variable name as a label
The variable is declared here
Creating a label with the same name as an in-scope variable leads to confusion.
(lint/suspicious/noLabelVar)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/formidable-settings-components.js
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/formidable_blocks.js
[error] 1-1: Unsafe usage of 'return'.
'return' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.
(lint/correctness/noUnsafeFinally)
[error] 1-1: Unsafe usage of 'throw'.
'throw' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.
(lint/correctness/noUnsafeFinally)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/formidable_overlay.js
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/formidable_styles.js
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: Do not use the t variable name as a label
The variable is declared here
Creating a label with the same name as an in-scope variable leads to confusion.
(lint/suspicious/noLabelVar)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/onboarding-wizard.js
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: Unsafe usage of 'throw'.
'throw' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.
(lint/correctness/noUnsafeFinally)
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 2-2: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 2-2: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 2-2: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 2-2: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 2-2: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 2-2: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/welcome-tour.js
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: Do not use the t variable name as a label
The variable is declared here
Creating a label with the same name as an in-scope variable leads to confusion.
(lint/suspicious/noLabelVar)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
🔇 Additional comments (1)
js/formidable_blocks.js (1)
1-1: LGTM - minified build artifact.This minified file contains only identifier renames (export symbol A→Ay, CSS class/keyframe renames) which are normal for minified builds. No functional changes detected.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
js/formidable_blocks.js (1)
1-380: Views block addon toggle helper looks fine; consider reusing shared helper and adding minimal error handlingThe bundled
Oe.toggleAddonStateimplementation and its use in theformidable/simple-viewblock look consistent with existing addon-toggle patterns and should work in the admin/editor whereajaxurlis globally defined.Since you already have addon-state logic in your source (e.g.,
js/src/admin/addon-state.js/js/frm_testing_mode.js) that also handles theajaxurlvsfrm_js.ajax_urlfallback, it may be worth consolidating these into a single helper at the source level to avoid divergence and keep URL/nonce handling and error behavior in one place. That would also make it easier to surface a basic failure state (e.g., resetisLoadingand optionally show a notice) instead of assuming the request always succeeds.No action needed on this generated bundle; any refactor should target the underlying source modules before rebuilding.
classes/controllers/FrmFieldsController.php (1)
370-379: Upsell flag wiring looks correct; consider centralizing field-type sets and ignore “unused” warningsThe new flags in
load_single_field_settings()are logically sound:
FrmAppHelper::pro_is_installed()is cached once and reused.show_upsell_for_*correctly gates on! $pro_is_installedand the relevantfield_has_*_optionboolean.$no_allowand the various$show_upsell_for_*/$field_has_*_optionvariables are clearly intended forsettings.phpvia theinclude, so PHPMD’s “unused local variable” warnings here are false positives.Two minor suggestions:
- If these same field-type lists (for Unique, Read Only, Before/After Contents) are or become needed elsewhere, it may be worth centralizing them (constants or a small helper) to avoid drift between Lite/Pro behavior.
- It’s worth double-checking that the arrays of field types for each option exactly match the intended Lite-capable types and UI expectations, but the structure here is fine.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
js/formidable_admin.js.mapis excluded by!**/*.map,!**/*.map
📒 Files selected for processing (3)
classes/controllers/FrmFieldsController.php(1 hunks)js/formidable_blocks.js(1 hunks)js/frm_testing_mode.js(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
classes/controllers/FrmFieldsController.php (1)
classes/helpers/FrmAppHelper.php (2)
pro_is_installed(394-396)FrmAppHelper(6-4985)
js/formidable_blocks.js (1)
js/src/admin/addon-state.js (2)
a(198-198)ajaxurl(12-12)
js/frm_testing_mode.js (2)
js/src/admin/upgrade-popup.js (1)
frmDom(3-3)js/src/frm_testing_mode.js (1)
frmDom(34-34)
🪛 Biome (2.1.2)
js/formidable_blocks.js
[error] 1-1: Unsafe usage of 'return'.
'return' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.
(lint/correctness/noUnsafeFinally)
[error] 1-1: Unsafe usage of 'throw'.
'throw' in 'finally' overwrites the control flow statements inside 'try' and 'catch'.
(lint/correctness/noUnsafeFinally)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 1-1: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
js/frm_testing_mode.js
[error] 2-2: This case is falling through to the next case.
Add a break or return statement to the end of this case to prevent fallthrough.
(lint/suspicious/noFallthroughSwitchClause)
[error] 2-2: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
[error] 2-2: Do not use the e variable name as a label
The variable is declared here
Creating a label with the same name as an in-scope variable leads to confusion.
(lint/suspicious/noLabelVar)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
[error] 2-2: Do not reassign a function declaration.
Reassigned here.
Use a local variable instead.
(lint/suspicious/noFunctionAssign)
🪛 PHPMD (2.15.0)
classes/controllers/FrmFieldsController.php
371-371: Avoid unused local variables such as '$no_allow'. (undefined)
(UnusedLocalVariable)
374-374: Avoid unused local variables such as '$show_upsell_for_unique_value'. (undefined)
(UnusedLocalVariable)
376-376: Avoid unused local variables such as '$show_upsell_for_read_only'. (undefined)
(UnusedLocalVariable)
378-378: Avoid unused local variables such as '$show_upsell_for_before_after_contents'. (undefined)
(UnusedLocalVariable)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Cypress
- GitHub Check: PHP 7.4 tests in WP trunk
- GitHub Check: PHP 8 tests in WP trunk
🔇 Additional comments (1)
js/frm_testing_mode.js (1)
2-240: Generated bundle change appears non-functional; OK to keep as-isThis file is clearly a compiled bundle (webpack-style). The shown change doesn’t introduce any observable behavioral differences, and the existing
toggleAddonState+ upgrade modal logic still looks consistent. Static-analysis complaints about things like fallthrough and function reassignment are expected on minified output and shouldn’t be addressed here; any cleanups should happen in the source modules before rebuilding.
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
classes/views/frm-fields/back-end/settings.php (1)
117-129: Conditionally render thedata-upgradeattribute.Similar to the unique field checkbox, the
data-upgradeattribute on line 123 is always rendered (producingdata-upgrade=""when Pro is installed). Apply the same conditional rendering pattern.Apply this diff:
- <input type="checkbox" id="frm_read_only_field_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[read_only_<?php echo esc_attr( $field['id'] ); ?>]" value="1" <?php checked( $field['read_only'], 1 ); ?> - class="<?php echo esc_attr( $no_allow ); ?>" - <?php echo 'data-upgrade="' . esc_attr( $pro_is_installed ? '' : __( 'Read only fields', 'formidable' ) ) . '"'; ?> - /> + <input type="checkbox" id="frm_read_only_field_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[read_only_<?php echo esc_attr( $field['id'] ); ?>]" value="1" <?php checked( $field['read_only'], 1 ); ?> + class="<?php echo esc_attr( $no_allow ); ?>" + <?php + if ( ! $pro_is_installed ) { + echo 'data-upgrade="' . esc_attr( __( 'Read only fields', 'formidable' ) ) . '"'; + } + ?>/>
♻️ Duplicate comments (2)
classes/views/frm-fields/back-end/settings.php (2)
105-115: Conditionally render thedata-upgradeattribute.The
data-upgradeattribute on line 110 is always rendered (producingdata-upgrade=""when Pro is installed). For cleaner markup, only output this attribute when Pro is not installed.Apply this diff:
- <input type="checkbox" name="field_options[unique_<?php echo esc_attr( $field['id'] ); ?>]" id="frm_uniq_field_<?php echo esc_attr( $field['id'] ); ?>" value="1" <?php checked( $field['unique'], 1 ); ?> class="frm_mark_unique <?php echo esc_attr( $no_allow ); ?>" - <?php echo 'data-upgrade="' . esc_attr( $pro_is_installed ? '' : __( 'Unique fields', 'formidable' ) ) . '"'; ?>/> + <input type="checkbox" name="field_options[unique_<?php echo esc_attr( $field['id'] ); ?>]" id="frm_uniq_field_<?php echo esc_attr( $field['id'] ); ?>" value="1" <?php checked( $field['unique'], 1 ); ?> class="frm_mark_unique <?php echo esc_attr( $no_allow ); ?>" + <?php + if ( ! $pro_is_installed ) { + echo 'data-upgrade="' . esc_attr( __( 'Unique fields', 'formidable' ) ) . '"'; + } + ?>/>
337-374: Addreadonlyattribute to Autocomplete select for consistency.The Autocomplete select element on line 352 is missing the
readonlyattribute, while the Visibility select on line 369 correctly includes it. Both are upsell fields that should be non-interactive in Lite.Apply this diff:
- <select name="field_options[autocomplete_<?php echo absint( $field['id'] ); ?>]" id="field_options_autocomplete_<?php echo absint( $field['id'] ); ?>" data-upgrade="<?php esc_attr_e( 'Autocomplete options', 'formidable' ); ?>"> + <select readonly name="field_options[autocomplete_<?php echo absint( $field['id'] ); ?>]" id="field_options_autocomplete_<?php echo absint( $field['id'] ); ?>" data-upgrade="<?php esc_attr_e( 'Autocomplete options', 'formidable' ); ?>">
🧹 Nitpick comments (1)
classes/views/frm-fields/back-end/settings.php (1)
376-402: Consider consistency between Before Input and After Input labels.The Before Input label (line 379) uses
frm-h-stack-xsclass and includes a tooltip, while the After Input label (line 396) has neither. If this is intentional (e.g., the tooltip on line 379 explains both fields), this is fine. Otherwise, consider adding the same styling and tooltip for consistency.If both fields should be consistent, apply this diff:
<p class="frm_form_field frm6"> - <label for="append_<?php echo absint( $field['id'] ); ?>" class="frm_show_upgrade"> + <label class="frm-h-stack-xs frm_show_upgrade" for="append_<?php echo absint( $field['id'] ); ?>"> <span><?php esc_html_e( 'After Input', 'formidable' ); ?></span> + <?php + FrmAppHelper::tooltip_icon( + __( 'A value entered here will show directly after the input box in the form.', 'formidable' ), + array( + 'data-placement' => 'right', + 'class' => 'frm-flex', + ) + ); + ?> </label>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
classes/controllers/FrmFieldsController.php(1 hunks)classes/views/frm-fields/back-end/settings.php(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
classes/views/frm-fields/back-end/settings.php (1)
classes/helpers/FrmAppHelper.php (3)
pro_is_installed(394-396)FrmAppHelper(6-4985)tooltip_icon(4859-4871)
classes/controllers/FrmFieldsController.php (1)
classes/helpers/FrmAppHelper.php (2)
pro_is_installed(394-396)FrmAppHelper(6-4985)
🪛 PHPMD (2.15.0)
classes/controllers/FrmFieldsController.php
371-371: Avoid unused local variables such as '$no_allow'. (undefined)
(UnusedLocalVariable)
378-378: Avoid unused local variables such as '$show_upsell_for_unique_value'. (undefined)
(UnusedLocalVariable)
380-380: Avoid unused local variables such as '$show_upsell_for_read_only'. (undefined)
(UnusedLocalVariable)
382-382: Avoid unused local variables such as '$show_upsell_for_before_after_contents'. (undefined)
(UnusedLocalVariable)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: PHP 7.4 tests in WP trunk
- GitHub Check: PHP 8 tests in WP trunk
- GitHub Check: Cypress
🔇 Additional comments (1)
classes/controllers/FrmFieldsController.php (1)
370-383: Logic for upsell flags is well-structured.The variables flagged by PHPMD as "unused" are actually used in the included view file (line 383:
classes/views/frm-fields/back-end/settings.php). These are false positives since static analysis cannot track usage acrossincludestatements.The logic correctly:
- Checks Pro installation status once
- Defines field type eligibility for each upsell feature
- Combines both conditions to determine upsell visibility
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @classes/helpers/FrmSettingsUpsellHelper.php:
- Around line 6-11: The docblocks in FrmSettingsUpsellHelper contain a
placeholder "@since x.x" that must be replaced with the real version; update the
class-level docblock for FrmSettingsUpsellHelper and the other docblocks
mentioned (around lines 41-47 and 69-78) to use the actual release version used
by this codebase (for example the plugin/package semantic version or the shared
version constant), e.g., "@since 1.2.3" or reference the canonical version
constant (if available) so no placeholder remains.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
classes/controllers/FrmFieldsController.phpclasses/helpers/FrmSettingsUpsellHelper.phpclasses/views/frm-fields/back-end/settings.phpclasses/views/frm-fields/back-end/upsell/autocomplete.phpclasses/views/frm-fields/back-end/upsell/before-after-contents.phpclasses/views/frm-fields/back-end/upsell/visibility.php
🚧 Files skipped from review as they are similar to previous changes (3)
- classes/views/frm-fields/back-end/upsell/autocomplete.php
- classes/views/frm-fields/back-end/upsell/visibility.php
- classes/views/frm-fields/back-end/upsell/before-after-contents.php
🧰 Additional context used
🧬 Code graph analysis (3)
classes/helpers/FrmSettingsUpsellHelper.php (1)
classes/helpers/FrmAppHelper.php (2)
pro_is_installed(386-388)FrmAppHelper(6-5024)
classes/views/frm-fields/back-end/settings.php (2)
classes/helpers/FrmAppHelper.php (2)
FrmAppHelper(6-5024)plugin_path(58-60)classes/helpers/FrmSettingsUpsellHelper.php (3)
FrmSettingsUpsellHelper(11-92)get_unique_element_atts(19-39)get_read_only_element_atts(48-67)
classes/controllers/FrmFieldsController.php (2)
classes/helpers/FrmAppHelper.php (2)
pro_is_installed(386-388)FrmAppHelper(6-5024)classes/helpers/FrmSettingsUpsellHelper.php (2)
FrmSettingsUpsellHelper(11-92)add_upgrade_modal_atts(79-91)
🪛 GitHub Actions: PHP Syntax Check
classes/controllers/FrmFieldsController.php
[error] 407-407: PHP Parse error: syntax error, unexpected ')' in ./classes/controllers/FrmFieldsController.php on line 407. Command: find -L . -path ./vendor -prune -o -path ./tests -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
🪛 PHPMD (2.15.0)
classes/controllers/FrmFieldsController.php
392-392: Avoid unused local variables such as '$visibility_upsell_atts'. (undefined)
(UnusedLocalVariable)
402-402: Avoid unused local variables such as '$autocomplete_upsell_atts'. (undefined)
(UnusedLocalVariable)
409-409: Avoid unused local variables such as '$before_after_content_upsell_atts'. (undefined)
(UnusedLocalVariable)
420-420: Avoid unused local variables such as '$show_upsell_for_unique_value'. (undefined)
(UnusedLocalVariable)
425-425: Avoid unused local variables such as '$show_upsell_for_read_only'. (undefined)
(UnusedLocalVariable)
426-426: Avoid unused local variables such as '$show_upsell_for_before_after_contents'. (undefined)
(UnusedLocalVariable)
427-427: Avoid unused local variables such as '$show_upsell_for_autocomplete'. (undefined)
(UnusedLocalVariable)
428-428: Avoid unused local variables such as '$show_upsell_for_visibility'. (undefined)
(UnusedLocalVariable)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: PHP 8 tests in WP 6.9
- GitHub Check: PHP 7.4 tests in WP 6.9
- GitHub Check: Cypress
🔇 Additional comments (3)
classes/helpers/FrmSettingsUpsellHelper.php (1)
1-92: The class is properly configured for autoloading. Thecomposer.jsonincludesclasses/helpers/in its classmap, which automatically registers all PHP classes in that directory. SinceFrmSettingsUpsellHelper.phpis in the correct location, it will be autoloaded before use inFrmFieldsController.phpandsettings.php. No fatal risk exists.classes/controllers/FrmFieldsController.php (1)
402-408: No trailing comma issue found — The code at line 406 does not have a trailing comma. Line 406 correctly ends with'/email-address/#kb-autocomplete-attribute'without a comma, and line 407 closes the function call with);. The code is syntactically valid for all PHP versions tested in CI (PHP 7.0 and 8.4).Likely an incorrect or invalid review comment.
classes/views/frm-fields/back-end/settings.php (1)
335-346: The variable usage is correct. All three upsell partials use the proper$_upsell_attsvariable names created inFrmFieldsController::load_single_field_settings(), and each array includes thedata-learn-moreattribute added byFrmSettingsUpsellHelper::add_upgrade_modal_atts()with valid KB URLs:
autocomplete.php: uses$autocomplete_upsell_attsvisibility.php: uses$visibility_upsell_attsbefore-after-contents.php: uses$before_after_content_upsell_attsAll variables are properly in scope when the partials are included. The
/wp-admin/undefinedissue likely stems from a different cause, such as a missing or misconfigured JavaScript click handler.Likely an incorrect or invalid review comment.
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| PHP | Mar 30, 2026 7:31p.m. | Review ↗ | |
| JavaScript | Mar 30, 2026 7:31p.m. | Review ↗ |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/frm_testing_mode.js`:
- Line 2: In addOneClick(e,t,r) the variable g is set then unconditionally
assigned g.href = e.dataset.learnMore which writes "undefined" when
data-learn-more is absent; change this to only assign g.href when
e.dataset.learnMore is truthy (non-empty), otherwise hide the link
(g.style.display="none") or set a safe fallback href (e.g. "#") and remove/avoid
using the undefined value; ensure you reference the data-learn-more dataset key
and update only inside the addOneClick function where g is defined.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: abf06a1d-64ae-4f41-9873-5f09ba656431
📒 Files selected for processing (7)
classes/controllers/FrmFieldsController.phpclasses/helpers/FrmFieldsHelper.phpclasses/views/frm-fields/back-end/settings.phpcss/admin/form-templates.csscss/frm_admin.cssjs/formidable_admin.jsjs/frm_testing_mode.js
✅ Files skipped from review due to trivial changes (1)
- css/admin/form-templates.css
🚧 Files skipped from review as they are similar to previous changes (2)
- classes/helpers/FrmFieldsHelper.php
- classes/views/frm-fields/back-end/settings.php
There was a problem hiding this comment.
Thanks @AbdiTolesa!
I think this is good to merge.
I'm requesting Laura's review as well. We can merge once she approves this.
@lauramekaj1 Can you help verify a few things:
- That the placeholder settings only appear when Pro is inactive.
- That all of the upsell URLs include the proper
utm_contentvalues. - That the Pro settings still all work as expected when Pro is active and this branch is checked out.
Thank you!
|
@AbdiTolesa Heads up I just merged Truong's pricing fields update. https://github.com/Strategy11/formidable-forms/pull/3006/changes It looks like there are new merge conflicts. And I believe there are some cases where we might want to include some of these upsells for the new field types in Lite (Product, Quantity, Total)? Can you figure out all of that out? Thank you! |
@Crabcyborg Surely, I will look into that soon. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2570 +/- ##
============================================
- Coverage 26.60% 26.52% -0.09%
- Complexity 8917 9084 +167
============================================
Files 145 149 +4
Lines 30018 30544 +526
============================================
+ Hits 7987 8102 +115
- Misses 22031 22442 +411 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closes https://github.com/Strategy11/formidable-pro/issues/5873
Summary by CodeRabbit
New Features
Style
UX