Pulling my hair out with this. Please help:
I have a page as such:
Basically, I want to take the User Input “adultselect” and multiply it with the database field “adultFrom” and then add User Input “childselect” multiplied with the database field “childFrom”. The Sum total would then be displayed in field “totalCost” which is blank in the database.
My current onClick code is:
export function searchButton_onClick(event) {
wixData.query(‘TopSanta’)
.contains(‘airport’, $w(‘#airportselect’).value)
.eq(“dayb”, “Y”)
.ascending(“airport”, “date”, “duration”)
.limit(100)
.find()
.then(res => {
$w(‘#table1’).rows = res.items;
$w(‘#table1’).show();
});
}
Can anybody help with the code to be added to make this happen?? Please.