I have created following schema using angular schemaform. But i want name to go in div1 and age to go in div2. Please help me out how to do this.
$scope.schema = {
type: "object",
properties: {
"name": {
"type": "string",
"title": "Name",
"required": true
},
"age": {
"type": "number",
"title": "Age"
}
}
};
$scope.form = [
"*",
{
type: "submit",
title: "Save"
}
];
<div id="div1"></div>
<div id="div2"></div>
I'm one of the guys working on the ASF project. There are 3 ways to go here.
As people have mentioned above, one way to go is making custom templates (or decorators as we call them).
The second is using the experimental feature manual field insertion. (Could work well)
Third way is a bit more hackish but quick to do. That is to run several instances of ASF with the same schema and model but split the form definition.
JS (simplified):
And the html would be something like this: