Custom forms at runtime

Hi, I would like to create a Custom Template - Table Specific - Edit Page in a similar way of the example from Code Repository:

 <# for (let f of fields) { #>
    <div id="r_<#= f.FldParm #>" class="mb-3 row">
        <label for="<#= f.FldVar #>" class="col-sm-2 col-form-label">{{{caption <#= f.FldParm #>}}}</label>
        <div class="col-sm-10">{{{value <#= f.FldParm #>}}}</div>
    </div>
    <# } #>

But I would like to build the for cycle not on the “fields” extracted from the project, but from a custom “fields” array extracted from a custom JSON file.

In practice, the ideal scenario would be to read a sublist of the table fields from a JSON, create the HTML code, perhaps even reading other information from the JSON, and use that to generate the page. Currently, the page creation happens when the project is generated, but for me, the ideal scenario would be to do it at runtime, so I can modify the JSON as I like without having to regenerate the project.

The main goal is to create runtime custom-forms using the field edit settings, but changing the other html tags as I like.

Any experience on this task?

You can create the form using JavaScript. Please google for “Create html form dynamically using JavaScript” for solutions.

Surely, but I would like to use ANM code to edit the fields with ANM settings, save the record with events, etc…