Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions css/_single_theme.css.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,24 @@
border-style:var(--field-border-style)<?php echo esc_html( $important ); ?>;
}

.<?php echo esc_html( $style_class ); ?> .frm_blank_field input::placeholder,

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.

.<?php echo esc_html( $style_class ); ?> .frm_blank_field textarea::placeholder,

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.

.<?php echo esc_html( $style_class ); ?> .frm_blank_field input.frm_default,

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.

.<?php echo esc_html( $style_class ); ?> .frm_blank_field textarea.frm_default,

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.

.<?php echo esc_html( $style_class ); ?> .frm_blank_field .placeholder,

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.

.<?php echo esc_html( $style_class ); ?> .frm_form_field input:invalid::placeholder,

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.

.<?php echo esc_html( $style_class ); ?> .frm_form_field textarea:invalid::placeholder {

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.

color:var(--text-color-error)<?php echo esc_html( $important ); ?>;
}

.<?php echo esc_html( $style_class ); ?> .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) input::placeholder,

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.

.<?php echo esc_html( $style_class ); ?> .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) textarea::placeholder,

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.

.<?php echo esc_html( $style_class ); ?> .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) input.frm_default,

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.

.<?php echo esc_html( $style_class ); ?> .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) textarea.frm_default,

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.

.<?php echo esc_html( $style_class ); ?> .frm_blank_field .frm_combo_inputs_container > .frm_form_field:not(.frm_blank_field) .placeholder {

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.

color:var(--text-color-disabled)<?php echo esc_html( $important ); ?>;
}

<?php
// Only include this style when the signatures add-on is active
if ( class_exists( 'FrmSigField' ) ) :
Expand Down
17 changes: 17 additions & 0 deletions tests/phpunit/styles/test_FrmStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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->assertMatchesRegularExpression( '/\.frm_form_field input:invalid::placeholder,[^{]*\{color:var\(--text-color-error\)/', $css );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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.

// 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 );

Copy link
Copy Markdown

Choose a reason for hiding this comment

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.

}
}
Loading