Skip to content

Add missing disabled submit button styles to Lite#3168

Merged
Crabcyborg merged 1 commit into
masterfrom
add_missing_disabled_submit_button_styles_to_lite
Jun 23, 2026
Merged

Add missing disabled submit button styles to Lite#3168
Crabcyborg merged 1 commit into
masterfrom
add_missing_disabled_submit_button_styles_to_lite

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

I noticed that disabled submit buttons don't appear disabled when Pro is inactive.

This fixes that.

Summary by CodeRabbit

  • Style
    • Enhanced visual feedback for disabled buttons with reduced opacity and "not-allowed" cursor styling applied across all disabled form submit controls and buttons.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds CSS disabled-state styling to css/_single_theme.css.php. Three selectors — input[type=submit][disabled], disabled form button inputs, and disabled buttons — receive opacity: 0.5 and cursor: not-allowed.

Changes

Disabled Submit Button Styles

Layer / File(s) Summary
Disabled submit/button CSS rules
css/_single_theme.css.php
Appends three disabled-state selectors for submit and button elements, setting opacity: 0.5 and cursor: not-allowed after the base submit button style block.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A bunny hopped and clicked "Submit,"
But the button was grayed — what a wit!
Now half-faint it glows,
With a "no" cursor pose,
Disabled at last — perfectly fit! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding CSS styles for disabled submit buttons in the Lite version of Formidable Forms, which matches the changeset content.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add_missing_disabled_submit_button_styles_to_lite

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Jun 23, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 02832ff...6dcd81f on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Jun 23, 2026 1:47p.m. Review ↗
JavaScript Jun 23, 2026 1:47p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Comment thread css/_single_theme.css.php
max-width:var(--submit-width)<?php echo esc_html( $important ); ?>;
<?php } ?>
}
.<?php echo esc_html( $style_class ); ?> input[type=submit][disabled],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable $style_class might not be defined


A variable has been used but not defined, which may result in warnings during program execution. This can also cause bugs since the intended usage scope of the variable is not known.

Comment thread css/_single_theme.css.php
<?php } ?>
}
.<?php echo esc_html( $style_class ); ?> input[type=submit][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button][disabled],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable $style_class might not be defined


A variable has been used but not defined, which may result in warnings during program execution. This can also cause bugs since the intended usage scope of the variable is not known.

Comment thread css/_single_theme.css.php
}
.<?php echo esc_html( $style_class ); ?> input[type=submit][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_submit button[disabled] {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable $style_class might not be defined


A variable has been used but not defined, which may result in warnings during program execution. This can also cause bugs since the intended usage scope of the variable is not known.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@css/_single_theme.css.php`:
- Around line 318-320: The CSS selector rule in the disabled button styling
block is incomplete and misses disabled submit buttons that are rendered outside
the `.frm_submit` container. Add additional selectors to the existing rule
targeting disabled buttons directly. Include selectors for
`button[type=submit][disabled]` to catch submit button elements with the
disabled attribute, and `.frm_button_submit[disabled]` to catch disabled buttons
with the frm_button_submit class. These new selectors should be added alongside
the existing ones under the same style class wrapper so that all disabled button
variations across the form are properly styled.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 13193e7a-25ba-4c77-a418-54eed55a8994

📥 Commits

Reviewing files that changed from the base of the PR and between 02832ff and 6dcd81f.

📒 Files selected for processing (1)
  • css/_single_theme.css.php

Comment thread css/_single_theme.css.php
Comment on lines +318 to +320
.<?php echo esc_html( $style_class ); ?> input[type=submit][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_submit button[disabled] {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Disabled button selector misses non-.frm_submit submit buttons.

classes/views/frm-forms/form.php renders a disabled <button class="frm_button_submit" disabled="disabled"> that is not shown inside .frm_submit, so this rule set may not apply to that Lite submit button case. Add a selector that targets disabled submit buttons directly (e.g., button[type=submit][disabled] and/or .frm_button_submit[disabled]) under the style class.

Suggested selector adjustment
 .<?php echo esc_html( $style_class ); ?> input[type=submit][disabled],
 .<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button][disabled],
-.<?php echo esc_html( $style_class ); ?> .frm_submit button[disabled] {
+.<?php echo esc_html( $style_class ); ?> .frm_submit button[disabled],
+.<?php echo esc_html( $style_class ); ?> button[type=submit][disabled],
+.<?php echo esc_html( $style_class ); ?> .frm_button_submit[disabled] {
 	opacity: 0.5;
 	cursor: not-allowed;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.<?php echo esc_html( $style_class ); ?> input[type=submit][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_submit button[disabled] {
.<?php echo esc_html( $style_class ); ?> input[type=submit][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_submit input[type=button][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_submit button[disabled],
.<?php echo esc_html( $style_class ); ?> button[type=submit][disabled],
.<?php echo esc_html( $style_class ); ?> .frm_button_submit[disabled] {
opacity: 0.5;
cursor: not-allowed;
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@css/_single_theme.css.php` around lines 318 - 320, The CSS selector rule in
the disabled button styling block is incomplete and misses disabled submit
buttons that are rendered outside the `.frm_submit` container. Add additional
selectors to the existing rule targeting disabled buttons directly. Include
selectors for `button[type=submit][disabled]` to catch submit button elements
with the disabled attribute, and `.frm_button_submit[disabled]` to catch
disabled buttons with the frm_button_submit class. These new selectors should be
added alongside the existing ones under the same style class wrapper so that all
disabled button variations across the form are properly styled.

@deepsource-io

deepsource-io Bot commented Jun 23, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 02832ff...6dcd81f on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Jun 23, 2026 1:47p.m. Review ↗
JavaScript Jun 23, 2026 1:47p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@Crabcyborg Crabcyborg merged commit b096bc4 into master Jun 23, 2026
45 of 48 checks passed
@Crabcyborg Crabcyborg deleted the add_missing_disabled_submit_button_styles_to_lite branch June 23, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant