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
Say you have a textarea field -- it's not being trimmed and whitespace-only is a valid value. Maybe you're letting users write and save whitespace code or something.
When rendering a text area with only whitespace as a value, it will disappear. the {% spaceless %}block strips it out.
This doesn't seem correct: if whitespace-only is a valid value, the form component and twig bridge shouldn't mess with it.
Work around: use a custom form theme without spaceless. This could also be the fix for this issue.
{# in some twig template #}
{% form_theme someVariableWithAFormView _self %}
{% block textarea_widget %}
<textarea {{ block('widget_attributes') }}>{{ value }}</textarea>
{% endblock textarea_widget %}