How to get value from html element using deluge?

How to get value from html element using deluge?

I am trying to capture the value entered in an HTML <input> tag of type "date" and store it in a variable using Deluge scripting. Here's the snippet of my code


<%{
    date_value = // Here I want to store the value entered in the below HTML tag
%>
<input id="date-input" type="date" />
<%}%>

The challenge is to retrieve the value entered by the user in the input tag (date-input) and assign it to the date_value variable in Deluge.

How can I achieve this?

Any guidance or examples of how to connect the HTML input with Deluge variables would be greatly appreciated. Thank you!