Canvas development: Difference between revisions

Jump to navigation Jump to search
m
Line 14: Line 14:


= Replace a creation form with your own template =
= Replace a creation form with your own template =
First thing to do is to find the URL of standard creation form you want to replace and add the parameter '''canvas=mymodule@mycanvas'''. To find url, you can go on page and get URL found at top of your browser.
First thing to do is to find the URL of standard creation form you want to replace and add the parameter '''canvas=mycanvas@mymodule'''. To find url, you can go on page and get URL found at top of your browser.


For example, imagine you want to replace the creation form of third parties with your own form. The url is something like
For example, imagine you want to replace the creation form of third parties with your own form. The url is something like
Line 33: Line 33:
* '''tabname''' is name of tab or page where initial form was stored. In most cases it is value "card".   
* '''tabname''' is name of tab or page where initial form was stored. In most cases it is value "card".   


For example, we will use value "'''societe@company'''" for canvas parameter. This is a value of an already coded demo canvas template for third parties, not used in a standard usage of Dolibarr but provided as "demo". So URL to create a third party using this alternative template is now:
For example, we will use value "'''company@societe'''" for canvas parameter. This is a value of an already coded demo canvas template for third parties, not used in a standard usage of Dolibarr but provided as "demo". So URL to create a third party using this alternative template is now:


'''http://mydomain/societe/soc.php?action=create&leftmenu=customers&canvas=societe@company'''
'''http://mydomain/societe/soc.php?action=create&leftmenu=customers&canvas=societe@company'''
76

edits

Navigation menu