Add custom javascrip to the forms node

i want to add some custom javascrip to the forms node trigger .

this is where the custom html code is located on github

i found the same file inside docker at this location /usr/local/lib/node_modules/n8n/templates/form-trigger.handlebars

with changing this and adding the JavaScript to this work . but every time i change is file and restart docker it reverts and no changes are there

Information on your n8n setup

  • n8n version: 1.80.3,
  • Database (default: SQLite): sqlite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker,):
  • Operating system: linux

Why not try embed the form on a page and manipulate it on page?

solved i was mounting the file incorrectly, first i had to copy the file in the directly and then mount it ,

apparently its how docker works , (beginner in docker)

    volumes:
      - n8n_data:/home/node/.n8n
      - n8n_files:/files/main
      - ./app/backend/db_data:/files/db_data
      - ./n8n/forms/form-trigger.handlebars:/usr/local/lib/node_modules/n8n/templates/form-trigger.handlebars

correct way to mount

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.