# HTML element dynamically changing url

**URL:** <https://forum.wixstudio.com/t/html-element-dynamically-changing-url/7330>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [January 3, 2023, 2:15am UTC](https://forum.wixstudio.com/t/html-element-dynamically-changing-url/7330 "2023-01-03T02:15:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zelenyanszki-dorka](https://avatars.discourse-cdn.com/v4/letter/z/f475e1/32.png) [@zelenyanszki-dorka](https://forum.wixstudio.com/u/zelenyanszki-dorka)\
**Post date:** [January 3, 2023, 2:15am UTC](https://forum.wixstudio.com/t/html-element-dynamically-changing-url/7330/1 "2023-01-03T02:15:12Z")

</div>

Hi,

I’m trying to add an HTML element that dynamically gets the url from a collection. Url is for a google form. I tried to create a custom HTML element for it but I go this error:

Uncaught ReferenceError: $w is not defined

Can’t we use the $w function in custom elements? If we can’t, is there any other option to create an element like this?

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![amandam](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/amandam/32/79539_2.png) [@amandam](https://forum.wixstudio.com/u/amandam)\
**Post date:** [January 3, 2023, 1:56pm UTC](https://forum.wixstudio.com/t/html-element-dynamically-changing-url/7330/2 "2023-01-03T13:56:44Z")

</div>

Hello, could you please add the relevant code snippet that is throwing your error including where the code is written (on the page, backend, html element). That way folks reading this will have more context to offer some ideas
