I’ve wrote a forum about my issue, this is the link of the forum:
https://www.wix.com/corvid/forum/community-discussion/how-to-change-the-price-according-to-the-inputs?origin=member_posts_page
This time I’ve made so changes and it’s worked
But her the questions :
I wrote this code
$w.onReady(() => {
//EUNE Server
let IronVI1 = "1$";
let IronIII1 = "2$";
let IronII1 = "3$";
let IronI1 = "4$";
let BronzeVI1 = "5$";
let BronzeIII1 = "6$";
let BronzeII1 = "7$";
let BronzeI1 = "8$";
//EUW Server
let IronVI2 = "9$";
let IronIII2 = "10$";
let IronII2 = "11$";
let IronI2 = "12$";
let BronzeVI2 = "13$";
let BronzeIII2 = "14$";
let BronzeII2 = "15$";
let BronzeI2 = "16$";
//If the user select the EUNE Server
switch ($w('#InpServer').value === "EUNE") {
case ($w('#inpDesRank').value === "Iron VI"):
$w("#price").text = IronVI1;
break;
case ($w('#inpDesRank').value === "Iron III"):
$w("#price").text = IronIII1;
break;
case ($w('#inpDesRank').value === "Iron II"):
$w("#price").text = IronII1;
break;
case ($w('#inpDesRank').value === "Iron I"):
$w("#price").text = IronI1;
break;
case ($w('#inpDesRank').value === "Bronze VI"):
$w("#price").text = BronzeVI1;
break;
case ($w('#inpDesRank').value === "Bronze III"):
$w("#price").text = BronzeIII1;
break;
case ($w('#inpDesRank').value === "Bronze II"):
$w("#price").text = BronzeII1;
break;
case ($w('#inpDesRank').value === "Bronze I"):
$w("#price").text = BronzeI1;
break;
}
//If the user select the EUW Server
switch ($w('#InpServer').value === "EUW") {
case ($w('#inpDesRank').value === "Iron VI"):
$w("#price").text = IronVI2;
break;
case ($w('#inpDesRank').value === "Iron III"):
$w("#price").text = IronIII2;
break;
case ($w('#inpDesRank').value === "Iron II"):
$w("#price").text = IronII2;
break;
case ($w('#inpDesRank').value === "Iron I"):
$w("#price").text = IronI2;
break;
case ($w('#inpDesRank').value === "Bronze VI"):
$w("#price").text = BronzeVI2;
break;
case ($w('#inpDesRank').value === "Bronze III"):
$w("#price").text = BronzeIII2;
break;
case ($w('#inpDesRank').value === "Bronze II"):
$w("#price").text = BronzeII2;
break;
case ($w('#inpDesRank').value === "Bronze I"):
$w("#price").text = BronzeI2;
break;
}
})
The question is when I test it in the preview the text of the top of the button change in 9$ (The price of the rank of Iron VI in the server EUW) but when I change the dropdown value nothing change, it’s still 9$
what is the problem ?