- {# templates/mdl/fields/textfield.html.twig #}
- {% with { 
-     tfEls: {
-         'Wrapper': {
-             'defaults': {
-                 'class': 'mdl-textfield mdl-js-textfield mdl-textfield--floating-label'
-             }
-         },
-         'Label': {
-             'defaults': {
-                 'class': 'mdl-textfield__label mdl-color-text--grey'
-             },
-             'excludes': ['text']
-         },
-         'Input': {
-             'defaults': {
-                 'class': 'mdl-textfield__input mdl-color-text--primary'
-             }
-         },
-         'Error': {
-             'defaults': {
-                 'class': 'mdl-textfield__error'
-             },
-             'excludes': ['text']
-         }
-     }
- } %}
- <div {% 
-     for attr, value in Wrapper
-         %}{{ attr }}{%
-         if value is not same as(true)
-             %}="{{ value|replace( { '~' :  attribute(attribute(attribute(tfEls, 'Wrapper'), 'defaults'), attr) ?? '' } ) }}"{%
-         endif
-         %} {% 
-     endfor %}>
-     <label {% 
-         for attr, value in Label %}{% if attr not in (attribute(attribute(tfEls, 'Label'), 'excludes') ?? [])
-             %}{{ attr }}{% 
-             if value is not same as(true) 
-                 %}="{{ value|replace( { '~' :  attribute(attribute(attribute(tfEls, 'Label'), 'defaults'), attr) ?? '' } ) }}"{% 
-             endif
-             %} {% 
-         endif %}{% endfor 
-     %}>{{Label.text ?: ''}}</label> 
-     <input {% 
-         for attr, value in Input %}{% if attr not in (attribute(attribute(tfEls, 'Input'), 'excludes') ?? [])
-             %}{{ attr }}{% 
-             if value is not same as(true) 
-                 %}="{{ value|replace( { '~' :  attribute(attribute(attribute(tfEls, 'Input'), 'defaults'), attr) ?? '' } ) }}"{% 
-             endif
-             %} {% 
-         endif %}{% endfor 
-     %}/>
-     <span {% 
-         for attr, value in Error %}{% if attr not in (attribute(attribute(tfEls, 'Error'), 'excludes') ?? [])
-             %}{{ attr }}{% 
-             if value is not same as(true) 
-                 %}="{{ value|replace( { '~' :  attribute(attribute(attribute(tfEls, 'Error'), 'defaults'), attr) ?? '' } ) }}"{% 
-             endif
-             %} {% 
-         endif %}{% endfor 
-     %}>{{Error.text ?: ''}}</span> 
- </div>
- {% endwith %}