user input value didnt sent to the DB

i wrote this function to change #price value if #hotel is Z

export function Hotel_change(event, $w) {
if ($w(“#Hotel”).value === “Z”) {
$w(“#price”).value = “200”;
}
}

but after this step i submit the form (with button) and the value didnt sent to the DB

if i wrote down 200 in form everything sent to DB fine

help?!

HI! Please define what kind of input is $w(" #Hotel "), if it is radioGroup , dropdown check that value and option have appropriate value or define site url to review.