diff --git a/assets/js/src/form_editor/blocks/text_input_edit.jsx b/assets/js/src/form_editor/blocks/text_input_edit.jsx index 4f413a8f59..8dc282dc5b 100644 --- a/assets/js/src/form_editor/blocks/text_input_edit.jsx +++ b/assets/js/src/form_editor/blocks/text_input_edit.jsx @@ -53,19 +53,39 @@ const TextInputEdit = ({ inputStyles.backgroundColor = styles.backgroundColor; } - const getTextInput = (placeholder) => ( - input.current.blur()} - /> - ); + const placeholderStyle = {}; + + if (styles.fontColor && !styles.inheritFromTheme) { + inputStyles.color = styles.fontColor; + if (labelWithinInput) { + placeholderStyle.color = styles.fontColor; + } + } + + const getTextInput = (placeholder) => { + let style = ''; + if (placeholderStyle.color !== undefined) { + style = `#${id}::placeholder {color: ${placeholderStyle.color};}`; + } + return ( + <> + + input.current.blur()} + /> + + ); + }; return (