Question:
I have the below code on my website, that adds database content to input elements. It works in this setup:
const currentItem = $w(“#dynamicDataset”).getCurrentItem();
$w(“#input22”).value = currentItem._id;
$w(“#input36”).value = currentItem.itinerary;
It works, but now I need to enter the “currentItem._id” not only to #input22, but also to #input37. The reason that I have to add it to another input element, is that I have 2 forms on my page that need to process the _id individually. I tried to add the below line but than the entire code doesn’t work anymore:
$w(“#input37”).value = currentItem._id;
Can anybody help me rebuilding the code so I can add the currentItem_id to 2 text elements on the same page?
Thanks in advance!
Product:
Wix Studio