hello
i have a couple of drop down list in my site
the ddl option connected to collection, and every time the user select one name of the list a query run to retrieve this name value from the collection and show it to him.
it works good whit on-change function for every ddl itself, but i want to be able to combine all the value from all the ddl together. i want the total to change whit every change of one of the ddl, not only to calculate it after the user finish selecting (that i know how to do whit the submit button).
so i need help
thank
here my code so far (basic query for each ddl):
export function dropdown1_change(event) {
wixData.query( "players" )
.contains( "name" , $w( "#dropdown1" ).value)
.find()
.then( (results) => {
let items = results.items;
let item = items[ 0 ];
let price = item.price;
$w( ‘#text8’ ).text = (price).toString();
})