I re-code a website using DRY principles with layouts and layouts variables but I get stuck with this :
Into a channel form I have to store each {field_name} into a {layout:set:append} so I can loop through this list into the layout template and dynamically show some stuff based on the fields name.
{exp:channel:form channel="mychannel" entry_id="{segment_3}"}
{custom_fields}
{layout:set:append name='lv_the_fields_name'}{field_name}{/layout:set}
{/custom_fields}
{/exp:channel:form}
But setting a layout variable into channel form seems to not be possible/parsed. I get {layout:set name='lv_the_fields_name'}the_name_of_my_field{/layout:set} in my HTML.
Before having the DRY approach I did show my divs this way in EE3+ (that was not beautiful but worked) :
{exp:channel:form channel="mychannel" entry_id="{segment_3}"}
{custom_fields}
<section class="cd-help-field field_{field_name}">
{embed="modify/_help_{field_name}"}
</section>
{/custom_fields}
{/exp:channel:form}
This technique worked in EE3+ but not anymore in EE5… it shows {embed="modify/_help_myfield"}
Is there a bug into channel form for EE5+ or does somebody know how I can achieve this please?