A button in my dynamic page about hotels open a lightbox ("lightbox1") contact form. I need to pass the title (Hotel Name) to the contact form text box ("#input2") automatically so the user doesent need to type it again.
I know how to get the title to a form in the same dynamic page from below code. but i need to pass that value to the lightbox form.
const itemObj = $w("#dynamicDataset").getCurrentItem(); $w('#input16').value = itemObj.title; }); //input16 is the textbox in the same page.
Im new to coding. please share an example if anyone can.