Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
florianpilz opened this issue Mar 18, 2016 · 0 comments
Open

Comments

@florianpilz
Copy link
Contributor

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.

@florianpilz florianpilz changed the title Make it easier to write widget templates inside the form template Make it possible to write widget templates inside the form template Mar 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant