New to WIX API here. I am trying to display a single field from my query as the initial value for an input box. Using the code below on a dropdown change event the results are not showing in the #input1. My question is this the best way of doing this, if so how do I pass a single result to an element?
let trl = $w(“#dropdown2”).value;
wixData.query(“TRAIL_COND”)
//.eq(“actv_ind”,“:true}”)
.eq(‘title’,trl)
.find()
.then( (results) => {
$w(‘#input1’).value = results.items.description;
} )
;