diff --git a/frappe_docs/www/docs/user/en/python-api/hooks.md b/frappe_docs/www/docs/user/en/python-api/hooks.md index 45c6e59c..3fe2f982 100644 --- a/frappe_docs/www/docs/user/en/python-api/hooks.md +++ b/frappe_docs/www/docs/user/en/python-api/hooks.md @@ -433,6 +433,23 @@ The above configuration will render `/not_found` when a 404 is occurred. It is upto you to implement the template `www/not_found.html` and controller `www/not_found.py`. +## Custom Web Form Context + +When a Web Form is created using non custom doctype, we can get the context from doctype's module but for Web Form using custom doctype you cannot get the context since custom doctype don't have modules, you can use this hook to create a context for Custom Web Form. + +**app/hooks.py** +```py +webform_list_context = "app.webform.get_webform_list_context" +``` + +**app/webform.py** +```py +def get_webform_list_context(): + return { + "get_list": get_webform_transaction_list + } +``` + ## Default Homepage Homepage is the page which is rendered when you visit the root URL (`/`) of your