# Custom JS for running against the form

**URL:** https://discourse.nodered.org/t/custom-js-for-running-against-the-form/34140
**Category:** Developing Nodes
**Created:** [12 October 2020 17:37 UTC](https://discourse.nodered.org/t/custom-js-for-running-against-the-form/34140 "2020-10-12T17:37:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![justin](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@justin](https://discourse.nodered.org/u/justin)
#### Post date: [12 October 2020 17:37 UTC](https://discourse.nodered.org/t/custom-js-for-running-against-the-form/34140/1 "2020-10-12T17:37:32Z")

</div>

I am new to node red, and I am trying to determine the mechanism (if any) for applying client-side javascript to run with/against the form. I have seen places with examples of jquery with a custom nodes forms, but have been unable to figure out how to apply this through the html piece of the node or some other place. Thanks guys

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [12 October 2020 18:00 UTC](https://discourse.nodered.org/t/custom-js-for-running-against-the-form/34140/2 "2020-10-12T18:00:26Z")

</div>

Hi @justin

The docs cover the node's html file: [https://nodered.org/docs/creating-nodes/node-html](https://nodered.org/docs/creating-nodes/node-html)

You can use the `oneditprepare` and `oneditsave` functions in the node's definition to trigger any custom behaviour you want in the edit dialog.

---

<div class="post-metadata">

### Author: ![justin](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@justin](https://discourse.nodered.org/u/justin)
#### Post date: [14 October 2020 13:26 UTC](https://discourse.nodered.org/t/custom-js-for-running-against-the-form/34140/3 "2020-10-14T13:26:59Z")

</div>

Thanks @knolleary, appreciate the help. It was right there in front of me. 😐

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [28 October 2020 13:27 UTC](https://discourse.nodered.org/t/custom-js-for-running-against-the-form/34140/4 "2020-10-28T13:27:12Z")

</div>

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