Section Icon
Allows users to add svg icon for form section break
- Author: raisulislam0
- Repository: https://github.com/raisulislam0/section_icon
- GitHub stars: 9
- Forks: 3
- License: MIT
- Category: Developer Tools
- Maintenance: Actively Maintained
Install Section Icon
bench get-app https://github.com/raisulislam0/section_icon
Add the Frappe Gems badge to your README
Maintain Section Icon? Paste this into your README:
[](https://frappegems.com/gems/apps/raisulislam0/section_icon)
About Section Icon
# Section Icon
A Frappe app that adds SVG icons to Section Break fields in your forms
Icons are stored in a dedicated **Section Icon** doctype and rendered inline next to section titles at runtime via a lightweight client script.
---
## How it works
1. You create a **Section Icon** record linking a DocType, a Section Break fieldname, and an SVG icon.
2. A bundled JS script listens for `form-refresh` events, fetches the icons for the current DocType (cached per session), and prepends each SVG inline next to the matching section title.
3. Cache is invalidated automatically via a Frappe realtime event whenever an icon is saved or deleted.
No Custom Fields are added to any DocType. No monkey-patching of core forms.
---
## Requirements
- Frappe Framework **v15** or **v16**
- Python 3.10+
---
## Installation
```bash
# From your bench directory
bench get-app https://github.com/raisulislam0/section_icon.git
bench --site your-site install-app section_icon
bench --site your-site migrate
bench --site your-site clear-cache
bench build --app section_icon
```
---
## Usage
### 1. Create a Section Icon record
Go to **Section Icon List → New** and fill in:
| Field | Description |
|---|---|
| **DocType** | The target DocType (e.g. `Employee`) |
| **Section Break Fieldname** | The exact fieldname of the Section Break (e.g. `passport_details_section`) |
| **SVG File** | Upload an `.svg` file — markup is extracted automatically |
| **SVG Markup** | Or paste raw SVG markup directly |
Either **SVG File** or **SVG Markup** must be provided. If you upload a file, the markup field is populated automatically on save.
### 2. Open the form
Open any document of the target DocType. The icon appears immediately to the left of the section title.
**Example SVG markup:**
```svg
```
---
## Uninstallation
```bash
bench --site your-site uninstall-app section_icon
bench remove-app section_icon
```
---
## License
MIT — see [LICENSE](LICENSE) for details.
Related Developer Tools apps for Frappe & ERPNext
- Frappe — Low code web framework for real world applications, in Python and Javascript
- Frappe Docker — Docker environment for developing, deploying, and running Frappe applications (ERPNext and custom apps) in production and development
- Builder — Craft beautiful websites effortlessly with an intuitive visual builder and publish them instantly
- Bench — CLI to manage Multi-tenant deployments for Frappe apps
- Frappe Ui — A set of components and utilities for rapid UI development
- Press — Full service cloud hosting for the Frappe stack - powers Frappe Cloud
- Gameplan — Open Source Discussions Platform for Remote Teams
- Doppio — A Frappe app (CLI) to magically setup single page applications and Vue/React powered desk pages on your custom Frappe apps.