Function doesn't return value on hover

Hello,

Try following the code below and let me know if it solves the problem. What I think is happening is that it is submitting before the onmousein event happens.

let ID;
 $w("#button30").onMouseIn( (event, $w) => {
 //Add your code for this event here: 
    $w("#text89").text="no";
    ID =  $w("#text89").text;
});

$w("#input10").value = ID;
//insert into database normally

Let me know if this helps,
Majd