php - Escape # when rendering nested value via twig in Drupal 8 -


in drupal 8, when trying render nested value starts "#", such #default_value, symfony freaking out because of unescaped # drupal names it's array structures with. there way escape "#"?

i tried formatting raw , using | e filter without luck.

<h1>test</h1>   <div>{{ form.field_perf_goal2_main.widget.0 }}</div>   <div>     {{ form.field_perf_goal2_main.widget.0.#default_value}}   </div>   {{ kint() }} 

in above example form.field_perf_goal2_main.widget.0 yields correct result (when kinted).

form.field_perf_goal2_main.widget.0.#default_value throws error of unexpected character. far know there isn't escape character feature in twig.

thanks!

@pig-ball. rendering such solved issue.

{{ form.field_perf_goal2_main.widget.0['#default_value'] }} 

Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -