# Call functions externally

**URL:** <https://talk.atomisystems.com/t/call-functions-externally/2884>\
**Category:** Support Questions\
**Created:** [March 10, 2020, 9:50am UTC](https://talk.atomisystems.com/t/call-functions-externally/2884 "2020-03-10T09:50:39Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![ToanLS](https://talk.atomisystems.com/letter_avatar_proxy/v4/letter/t/46a35a/32.png) [@ToanLS](https://talk.atomisystems.com/u/ToanLS)\
**Post date:** [July 25, 2023, 2:02am UTC](https://talk.atomisystems.com/t/call-functions-externally/2884/21 "2023-07-25T02:02:48Z")

</div>

Hi Bill,

> [@Bill\_Mac](#):
>
> I don’t know how one would get the info from an input field etc??

You can set an `id` for the input field, and use `document.getElementById('id of the input field')` to access it. For example:

- In the custom element:  
`<input type="text" id="user_name">`
- In an event:  
`var user_name = document.getElementById('user_name').value;`

> [@Bill\_Mac](#):
>
> The problem (and of course it might just be me) is, i can’t call “normal functions” using that method. that don’t show up. And of course that is because these are triggers…so no doc, e arguments.

You should double-click the Function field, select Add Function to add an event handler, and call the normal function in the handler:

```javascript
function yourEventHandler(doc, e) {
    yourNormalFunction();
}

```

Regards

---

<div class="post-metadata">

**Author:** ![Bill\_Mac](https://talk.atomisystems.com/user_avatar/talk.atomisystems.com/bill_mac/32/2641_2.png) [@Bill\_Mac](https://talk.atomisystems.com/u/Bill_Mac)\
**Post date:** [July 25, 2023, 9:38am UTC](https://talk.atomisystems.com/t/call-functions-externally/2884/22 "2023-07-25T09:38:21Z")

</div>

Thank you Toan! I will try that.  
Love this software! The html widget and custom element add so much more. 😃

[Previous page](https://talk.atomisystems.com/t/call-functions-externally/2884.md?page=1)
