Skip to content

Make it possible to write widget templates inside the form template #52

@florianpilz

Description

@florianpilz

A great addition to ajja would be to describe a template for a single field inline, i.e. inside the form template like this (field-custom):

<script id="form-template" type="text/x-template">
    <form method="POST" action="{{action}}" id="{{form_id}}">
      <div id="field-subject"></div>
      <div id="field-body"></div>
      <div id="field-custom">
        <textarea cols="80" rows="15" data-bind="value: {{name}}" name="{{name}}"></textarea>
      </div>
    </form>
</script>

This way I avoid the overhead to define a template and to define it's use for field-custom inside the options by expressing it via the HTML structure. This would be a burden for a template that is used just once.

Of course, if I want to reuse the template, it must be extracted from the form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions