2
0
mirror of https://github.com/frappe/books.git synced 2025-01-24 07:38:25 +00:00
This commit is contained in:
Rushabh Mehta 2018-01-10 18:27:24 +05:30
parent ec96f02f52
commit 9ae2b84805
2 changed files with 12 additions and 13 deletions

View File

@ -44,8 +44,8 @@ edit_page.on('show', async (params) => {
To setup a form for a new document, just create a new document with the Frappe.js document helpers, and `use` it with paramter `is_new` = true To setup a form for a new document, just create a new document with the Frappe.js document helpers, and `use` it with paramter `is_new` = true
```js ```js
// setup todo new // setup todo new
frappe.router.add('new/todo', async (params) => { frappe.router.add('new/todo', async (params) => {
// new document // new document
app.doc = await frappe.get_doc({doctype: 'ToDo'}); app.doc = await frappe.get_doc({doctype: 'ToDo'});
@ -58,6 +58,5 @@ To setup a form for a new document, just create a new document with the Frappe.j
// is_new=true // is_new=true
app.edit_page.form.use(app.doc, true); app.edit_page.form.use(app.doc, true);
}); });
``` ```

View File

@ -8,7 +8,7 @@ Frappe.js is a meta-data driven framework that enables rapid application develop
- [Declaring Models](models.md) - [Declaring Models](models.md)
- [Controllers](controllers.md) - [Controllers](controllers.md)
- [Metadata](metadata.md) - [Metadata](metadata.md)
- [Managing Documents](documents.md) - [Managing Documents](document.md)
- [Server](server.md) - [Server](server.md)
- [REST API](rest.md) - [REST API](rest.md)
- [Client](client.md) - [Client](client.md)