# Data Pass From Repeater to Lightbox

**URL:** <https://forum.wixstudio.com/t/data-pass-from-repeater-to-lightbox/390>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [May 1, 2023, 4:17pm UTC](https://forum.wixstudio.com/t/data-pass-from-repeater-to-lightbox/390 "2023-05-01T16:17:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![info60561](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/info60561/32/7747_2.png) [@info60561](https://forum.wixstudio.com/u/info60561)\
**Post date:** [May 1, 2023, 4:17pm UTC](https://forum.wixstudio.com/t/data-pass-from-repeater-to-lightbox/390/1 "2023-05-01T16:17:49Z")

</div>

Hi,  
Kindly us to pass data from repeater to textbox lightbox

we have repeater with some data like code / name / price/ with inquiry click

we want that is customer click on inquiry button , all above data will pass to text box available on wix light which open on click event on inquiry button ,

**Help to rectify this below code if any one new code in simple way better i am too much expert in this**

**Code on Inquiry Button,**

export function button14\_click ( event ) {  
// This function was added from the Properties & Events panel. To learn more, visit [Velo: Working with the Properties & Events Panel | Help Center | Wix.com](http://wix.to/UcBnC-4)  
// Add your code for this event here:  
$w ( ‘#repeater9’ ). onItemReady ( ( $item , itemData , index ) =\> {  
$item ( ‘#button14’ ). onClick ( ( event ) =\> {  
**let** pn = $item ( ‘#text111’ ). text ;  
wixWindow . openLightbox ( “Inquiry” , pn );

});  
});  
};

**Code on Light box load**

$w . onReady ( **function** () {

```
 **let** records = wixWindow . lightbox . getContext (); 
**let** pn = records . pn ; 
    $w ( '#text99' ). text = pn . toLocaleString (); 

```

})

 ![](https://us1.discourse-cdn.com/wix/original/3X/8/a/8a0e2e9273654557c6d0f38a693d3ce150931efa.png)

 ![](https://us1.discourse-cdn.com/wix/original/3X/2/4/24476f8161d8c98e33a8477f74a6bbccae4fecc1.png)

---

<div class="post-metadata">

**Author:** ![thomasj](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/thomasj/32/30791_2.png) [@thomasj](https://forum.wixstudio.com/u/thomasj)\
**Post date:** [May 2, 2023, 3:17pm UTC](https://forum.wixstudio.com/t/data-pass-from-repeater-to-lightbox/390/2 "2023-05-02T15:17:37Z")

</div>

Assuming the Lightbox is not properly getting the data passed from the repeater, I believe the issue is when you attempt to access the context data.

Original Code:

```javascript
let records = wixWindow.lightbox.getContext();
let pn = records.pn;

```

Instead it should be:

```javascript
let pn = wixWindow.lightbox.getContext();

```

Since you passed in a string ($item(‘#text111’).text) you do not need to access the .pn property to get the value within the Lightbox.

---

<div class="post-metadata">

**Author:** ![info60561](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/info60561/32/7747_2.png) [@info60561](https://forum.wixstudio.com/u/info60561)\
**Post date:** [May 3, 2023, 3:46am UTC](https://forum.wixstudio.com/t/data-pass-from-repeater-to-lightbox/390/3 "2023-05-03T03:46:56Z")

</div>

Hi Thomas ,

**Thanks you so much , for your help,**

after updatting with your code working fine as we are looking ,

---

<div class="post-metadata">

**Author:** ![info60561](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/info60561/32/7747_2.png) [@info60561](https://forum.wixstudio.com/u/info60561)\
**Post date:** [May 3, 2023, 3:47am UTC](https://forum.wixstudio.com/t/data-pass-from-repeater-to-lightbox/390/4 "2023-05-03T03:47:59Z")

</div>

can you do one more help,  
we require multiple field value would be code,

like 2/3 text box

---

<div class="post-metadata">

**Author:** ![info60561](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/info60561/32/7747_2.png) [@info60561](https://forum.wixstudio.com/u/info60561)\
**Post date:** [May 3, 2023, 3:48am UTC](https://forum.wixstudio.com/t/data-pass-from-repeater-to-lightbox/390/5 "2023-05-03T03:48:04Z")

</div>

can you do one more help,  
we require multiple field value would be code,

like 2/3 text box

---

<div class="post-metadata">

**Author:** ![info60561](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/info60561/32/7747_2.png) [@info60561](https://forum.wixstudio.com/u/info60561)\
**Post date:** [May 3, 2023, 3:51am UTC](https://forum.wixstudio.com/t/data-pass-from-repeater-to-lightbox/390/6 "2023-05-03T03:51:20Z")

</div>

can you do one more help,  
we require multiple field value would be code,

like 2/3 text box
