From 673bdf56dec0e978c742decff7995bcadcb62c98 Mon Sep 17 00:00:00 2001 From: "vivi-the-going-merry[bot]" <308115520+vivi-the-going-merry[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2026 06:26:05 -0600 Subject: [PATCH 1/2] Apply error text colour to placeholders in fields with errors Pre-PR WIP: live render check + PR still TODO. Co-Authored-By: Claude Sonnet 5.5 --- css/_single_theme.css.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/css/_single_theme.css.php b/css/_single_theme.css.php index 4aa58e84fd..3214d1b043 100644 --- a/css/_single_theme.css.php +++ b/css/_single_theme.css.php @@ -412,6 +412,24 @@ border-style:var(--field-border-style); } +. .frm_blank_field input::placeholder, +. .frm_blank_field textarea::placeholder, +. .frm_blank_field input.frm_default, +. .frm_blank_field textarea.frm_default, +. .frm_blank_field .placeholder, +. .frm_form_field input:invalid::placeholder, +. .frm_form_field textarea:invalid::placeholder { + color:var(--text-color-error); +} + +. .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) input::placeholder, +. .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) textarea::placeholder, +. .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) input.frm_default, +. .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) textarea.frm_default, +. .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) .placeholder { + color:var(--text-color-disabled); +} + Date: Thu, 29 Oct 2026 21:24:17 -0300 Subject: [PATCH 2/2] test(styles): cover error placeholder color in generated CSS (#6929) Co-Authored-By: Claude Opus 5.5 --- tests/phpunit/styles/test_FrmStyle.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/phpunit/styles/test_FrmStyle.php b/tests/phpunit/styles/test_FrmStyle.php index a462a5401c..4a4322a13e 100644 --- a/tests/phpunit/styles/test_FrmStyle.php +++ b/tests/phpunit/styles/test_FrmStyle.php @@ -301,4 +301,21 @@ public function test_save_settings_stores_padded_timestamp_version() { $this->assertGreaterThanOrEqual( (int) $before, (int) $version ); $this->assertLessThanOrEqual( (int) $after, (int) $version ); } + + /** + * Placeholders in a field with an error must use the Error > Field Text color, not the Read Only text color. + * + * @see https://github.com/Strategy11/formidable-pro/issues/6929 + */ + public function test_generated_css_uses_error_color_for_placeholders_in_fields_with_errors() { + $css = $this->run_private_method( + array( new FrmStyle(), 'get_css_content' ), + array( FrmAppHelper::plugin_path() . '/css/custom_theme.css.php' ) + ); + + $this->assertMatchesRegularExpression( '/\.frm_blank_field input::placeholder,[^{]*\{color:var\(--text-color-error\)/', $css ); + $this->assertMatchesRegularExpression( '/\.frm_form_field input:invalid::placeholder,[^{]*\{color:var\(--text-color-error\)/', $css ); + // Sub fields of a combo field without an error keep the normal placeholder color. + $this->assertMatchesRegularExpression( '/\.frm_form_field:not\(\.frm_blank_field\) input::placeholder,[^{]*\{color:var\(--text-color-disabled\)/', $css ); + } }