# Edge: Lua widgets now require using widget.new

**URL:** https://community.silverbullet.md/t/edge-lua-widgets-now-require-using-widget-new/1971
**Category:** Lua
**Created:** [March 14, 2025, 7:23pm UTC](https://community.silverbullet.md/t/edge-lua-widgets-now-require-using-widget-new/1971 "2025-03-14T19:23:00Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![zeus-web](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zeus-web/32/571_2.png) [@zeus-web](https://community.silverbullet.md/u/zeus-web)
#### Post date: [March 15, 2025, 8:05am UTC](https://community.silverbullet.md/t/edge-lua-widgets-now-require-using-widget-new/1971/2 "2025-03-15T08:05:38Z")

</div>

Great!  
I think, this again opens great possibilities!

Might come to a solution for my Idea here:

> [@Input fields (forms) to be used eg. by LUA](https://community.silverbullet.md/t/input-fields-forms-to-be-used-eg-by-lua/1842):
>
> My idea is to have the possibility to add some kind of input fields to a page and use the input from LUA scritpts. Just like the buttons we already have. That would make several usecases possible: implement calculators (enter a number and calculate something with it) Input forms to enter data for database like silverbullet objects, like #person enter search queries (e.g. for silverbullet or even other webpages by open a link with the search query) and many more slight_smileOf course one …

Already tried this out and I’m able to generate an input field, which fires an event on change of the inputtext.  
However, I could not figure out, yet, how to get to the text I put in…

Looks like I miss a puzzle piece again 🙂

My Example:

````lua
```space-lua
function myInputField(text)
  return widget.new {
    html = text .."<input type=\"text\">",
    events = {
      change = function()
        editor.flashNotification("changed " .. text)
      end
    }
  }
end

````

${myInputField("Input here: ")}

![image](https://community.silverbullet.md/uploads/default/original/2X/0/0cc3fabb5c186835a6116ed142fa48e6aff12759.png)

---

_[View the full topic](https://community.silverbullet.md/t/edge-lua-widgets-now-require-using-widget-new/1971)._
