Hi there,
In this post, I am going to share a query of mine, from my website, for finding an answer.
In my website, there is repeater. And in the repeater, there is a button. When the button is clicked a lightbox will open.
Repeater and the button ---
Lightbox --
What I want is, when the button is clicked in repeater I want to get the current item (selected item ) from the repeater and change the value to the value the user submits from this lightbox.
Thanks,
Ajith
Hai Russian Dima
This Code Works Now !!!!
Page --
$w('#dataset2').onReady( () => { $w('#repeater1').forEachItem( ($item, index) => { $item('#button4').onClick((event) => { let clickedItemData = $item("#dataset2").getCurrentItem().status; let clickedItemData1 = $item("#dataset2").getCurrentItem().image; let clickedItemData2 = $item("#dataset2").getCurrentItem().fullName; console.log(clickedItemData); console.log(clickedItemData1); console.log(clickedItemData2); let lightboxdata = { "status": clickedItemData, "image" : clickedItemData1, "fullName" : clickedItemData2, } wixWindow.openLightbox('EditStatus', lightboxdata); }) }) } )
Lightbox --
import wixWindow from 'wix-window'; $w.onReady( function () { let received = wixWindow.lightbox.getContext(); $w('#textBox1').placeholder = received.status; $w('#image3').src = received.image; } );