Looking for an example on how to modify the submit to
-POST to a REST service
-Not redirect the page
weak attempt..
//add to existing dom
ui.content.find('#add').append('<form id="addFrm" method="POST" onsubmit="svc.addResource();return false;"></form>'.format(_host.service));
page.addForm = $("#addFrm").kendoForm({
formData: {
id: 0,
modifiedBy: _user.email,
projectName: page.project.name,
role: '',
resourceType: '',
upn: '',
userDisplayName: ''
},
items: [{ editor: 'DropDownList', field: 'role', label: 'Project Role',
validation: { required: true, message: "must specific resource role" },
hint: "Hint: Solution Architect, Project Manager, Technical Lead, etc..",
editorOptions: { optionLabel: 'select project role...',dataSource: page.roles, dataTextField: 'role', dataValueField: 'role'} },
{ editor: 'DropDownList', field: 'resourceType', label: 'Resource Type',
validation: { required: true, message: "must specific type resource of resource" },
hint: "Hint: Vendors existing supplier, Contractors are independently hired, Any if TBD..",
editorOptions: {
optionLabel: 'select type of resource...',
dataSource: [{ text: 'Any' }, { text: 'Employee' }, { text: 'Vendor' }, { text: 'Contractor' }],
dataTextField: 'text',
dataValueField: 'text'
}
}
]
});