Hello I am trying to create custom page which will render some filter fields and custom html.
So I started with creating site: Desk > Page > Create New - i created new page with name MyPage in custom module with name CModule which is in custom app CApp
After that i found files in: capp/capp/capp/page/mypage/
I changed file: capp/capp/capp/page/mypage/mypage.js
Page custom field is working. Problem starting at capp.MyPage.
I don’t know how can i define capp in js and which class may i extend when i want create custom page with custom html and filtering. And how can i do somethink like this:
capp.MyPage = erpnext.SomeClass({
Where i can define cpp.MyPage. Do i need extend some class? Maybe some class which will handle filter form?
I also created custom html template in: capp/capp/public/js/templates/mypage.html - this is builded - i setted build.json file and add app include_js in hooks
app_include_js = "/assets/js/capp.min.js
Is there any minimal example for custom page like this?
Hi, thanks but all of this i know. I know how can i render html through js (for example in custom HTML FIELD). My problem is:
-how to do it in custom page?
-which erpnext or frappe class need extend when i want work with forms (filters) in custom?
-how can i create custom js class for my custom app through extending some existing class?