Open strainovic opened 7 years ago
Thanks @MetaAbstract but it is not what I want to achieve. With order options I can only rearrange display order, but I cannot add custom loyout for whole object and sub-properties.
Here is an example:
<div data-alpaca-layout-binding="user"></div>
That's how I can bind user object with div DOM element but I cannot do something like this:
<div data-alpaca-layout-binding="user">
<ul class="collapsible popout" data-collapsible="accordion">
<li>
<div class="collapsible-header active"><span class="accordion-number">1</span>First Name</div>
<div class="collapsible-body">
<div data-alpaca-layout-binding="firstName"></div>
</div>
</li>
<li>
<div class="collapsible-header"><span class="accordion-number">2</span>Last Name</div>
<div class="collapsible-body">
<div data-alpaca-layout-binding="lastName"></div>
</div>
</li>
</ul>
</div>
I am not deeply dived in layout, but i think you need to combine twitter bootstrap css,js capabilities for example with alpaca capabilities in custom template.
I've found this example but it simple does not work.
Customer Profile - Edit with Custom View
If you look at the source you'll find /address section with his own layout, template and bindings properties but it does not work. Layout bindings only works for the top level schema elements but not for sub-elements. Only what I can do is to add fieldClass or labelClass CSS styles but it won't let me to add custom html code into layout as I've already shown above.
Have you tried using templates? http://www.alpacajs.org/docs/api/templates.html
Those have always worked for me.
Anything new with this? Has anyone found a way to make it work?
+1
+1
+1, I have some pretty complex forms and layout of sub-elements is dearly required.
+1 News?
any update on this? Is layouts within sub-elements possible?
I'm unable to find proper solution for binding object properties or array items fields like we can bind top level elements into layout template.
For example:
I'm able to bind user object and it will add firstName and lastName automatically one by one into DOM but I can't rearrange them as I wish or user custom layout for whole object.
Is there any solution for this situation?
Thanks!