You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Apply error text colour to placeholders in fields with errors - #3632
Broken: Style > Field Colors > Error > Field Text didn't reach placeholder text in fields with an error, so placeholders stayed the disabled grey (unreadable on a dark Error background).
Changed:css/_single_theme.css.php adds an error-state placeholder rule (::placeholder, .frm_default, .placeholder) under .frm_blank_field and :invalid, using --text-color-error. A second rule restores the disabled colour for sub fields of a combo field that aren't themselves in error, matching the existing combo-field reset above it.
Verified: Live in a Playground instance on this branch's CSS. Error Background rgba(29,29,27,0.5), Error Field Text #fff, empty required text field with a placeholder, submitted empty. Computed ::placeholder colour: rgb(136,136,136) before, rgb(255,255,255) after.
Before
After
Not verified: combo-field sub-field reset rendered live (selector mirrors the existing reset); CI result.
We reviewed changes in d31ea91...f71fb06 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
The reason will be displayed to describe this comment to others. Learn more.
Approving. Reproduced the bug live on base and confirmed the fix on this branch, using a Playground env with Lite at each commit and the stylesheet regenerated each time (the generated formidableforms.css is cached, so switching branches alone shows stale CSS).
Setup: default style with Error Field Text #fff and Error Background #1d1d1b, one required text field with placeholder "Your name here", submitted empty.
Computed ::placeholder colour
Screenshot
Base (3a919a7)
rgb(102, 112, 133) (disabled grey, hard to read on the dark error background)
This PR (673bdf5)
rgb(255, 255, 255)
Checked by reading the CSS:
No regression before submit: on page load the required empty field is not :invalid and its placeholder stays disabled grey. The new :invalid selectors match the existing .frm_form_field :invalid error rule just above them, so the placeholder now follows the same state as the field's own error text, background and border.
Specificity: the new rule beats both existing placeholder rules (input::placeholder, input.frm_default) by at least one class, and the combo reset beats the new rule when a sub field is not itself in error.
Floating labels:custom_theme.css.php hides inside-label placeholders with opacity, not color, so this colour change doesn't surface them.
Same pattern elsewhere: no other error-state placeholder rules exist in css/ that this misses.
Not exercised live: the combo-field sub-field reset (Pro Name/Address). It mirrors the reset directly above it and I only verified its specificity from source. CI: Psalm and DeepSource PHP are red, but this diff is CSS-only inside a PHP template with no PHP logic changed. Reviewed by hand rather than with the review skills, given an 18-line CSS-only diff.
Added a PHPUnit test, test_FrmStyle::test_generated_css_uses_error_color_for_placeholders_in_fields_with_errors (commit 625d1a6). It renders custom_theme.css.php through FrmStyle::get_css_content() and asserts that the .frm_blank_field and :invalid placeholder selectors use --text-color-error, and that the combo sub-field reset keeps --text-color-disabled. It fails against master CSS and passes on this branch.
Also merged master. test_FrmStyle passes (29 tests) and phpcs (Lite ruleset) is clean.
The reason will be displayed to describe this comment to others. Learn more.
Call to an undefined method test_FrmStyle::assertMatchesRegularExpression()
The method you are trying to call is not defined, which can result in a fatal error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes Strategy11/formidable-pro#6929
Broken: Style > Field Colors > Error > Field Text didn't reach placeholder text in fields with an error, so placeholders stayed the disabled grey (unreadable on a dark Error background).
Changed:
css/_single_theme.css.phpadds an error-state placeholder rule (::placeholder,.frm_default,.placeholder) under.frm_blank_fieldand:invalid, using--text-color-error. A second rule restores the disabled colour for sub fields of a combo field that aren't themselves in error, matching the existing combo-field reset above it.Verified: Live in a Playground instance on this branch's CSS. Error Background
rgba(29,29,27,0.5), Error Field Text#fff, empty required text field with a placeholder, submitted empty. Computed::placeholdercolour:rgb(136,136,136)before,rgb(255,255,255)after.Not verified: combo-field sub-field reset rendered live (selector mirrors the existing reset); CI result.
🤖 Generated with Claude Code