I need help in connecting 4 collections together via the main field that brings them together in value. The form in the image consists of six dropdown menus that use Queen Code . I want when I click on the category in the third dropdown, the data in the other collection will be read via code
this code for the dropdown from collection 1 , I need the code for the other dropdown
$w.onReady(function() {
typeproduct();
$w("#btnPay").onClick(()=>{
$w("#txtMessage").show(); $w("#txtMessage").expand();
$w('#txtMessage').text = "Waiting for response from Stripe...";
$w('#txtMessageLabel').hide(); $w("#txtMessageLabel").expand();
payNow(); //<<<---------------------------------------------------------------------------------What's that? Does this work ??? Now it is an own FUNCTION ! See code below!
})
$w("#DDinput1").onChange(()=>{DDinput2(), $w("#DDinput2").enable();});
$w("#DDinput2").onChange(()=>{DDinput3(); $w("#DDinput3").enable();});
$w("#DDinput3").onChange(()=>{ //<<<-------------------------------------------------------------------------------------> "productcategory"
wixData.query("Designproduct")
.eq("category", $w('#DDinput3').value)
.find()
.then((results)=> {
let yourItem = results.items;
$w('#image9').src = yourItem[0].categoryImage.toString()
$w('#text76').text = results.items[0].desCategory.toString()
$w('#amount1').text = results.items[0].price.toString()
$w('#Amount').value = $w('#amount1').text
});
DDinput4();
if ($w("#DDinput3").value !== "" && $w("#DDinput3").value !== 0 && $w("#DDinput3").value !== undefined){
$w("#DDinput4").enable(),fill_DDinput4();
}
else {$w("#DDinput4").disable();}
})
$w("#DDinput4").onChange(()=>{ //<<<-------------------------------------------------------------------------------------> "productsize"
wixData.query("AllProductSize").eq("size", $w('#DDinput4').value).find()
DDinput5();
$w("#DDinput5").enable(),fill_DDinput5();
})
$w("#DDinput5").onChange(()=>{ //<<<-------------------------------------------------------------------------------------> "productcolor"
wixData.query("AllProductColor").eq("productColor", $w('#DDinput5').value).find()
.then((results)=> {
let yourItem = results.items;
$w('#image8').src = yourItem[0].colorPicture.toString()
})
DDinput6();
$w("#DDinput6").enable();
})