Lightbox Data obj isn't loading.

So whenever a selection is changed the dtobj function is called which does the following:
Basically saves each variable to the dataObj object.

function dtobj() {
	dataObj = {
		"beds": beds,
		"baths": baths,
		"cleantype": cleaningtype,
		"cleanfreq": frequency,
		"totalprice": price_total,
		"refrigirator": fridge,
		"cabinets": cabinets,
		"oven": oven,
		"closets": closets,
		"windows": windows,
		"organize": organize,
		"walls": walls,
		"baseboards": baseboards
	};
	console.log(dataObj)
	return true;
}

When the button “Complete Booking” is clicked the following runs:
Basically it runs to update the variables once more before sending the dataObj object to the lightbox as data.

if (dtobj()) {	
wixWindow.openLightbox("CompleteBooking", dataObj)
}

Then, on the lightbox side, the lightbox receives the data and does some things there:
But it doesn’t even run the console.log(x), so the data is never reaching my lightbox for some reason…

$w.onReady(function () {
		let x = wixWindow.lightbox.getContext();
		console.log(x);
		var beds = x.beds;
		var baths = x.baths;
		var cleantype = x.cleantype;
		var cleanfreq = x.cleanfreq;
		var totalprice = x.totalprice;
		var refrigirator = x.refrigirator;
		var cabinets = x.cabinets;
		var oven = x.oven;
		var closets = x.closets;
		var windows = x.windows;
		var organize = x.organize;
		var walls = x.walls;
		var baseboards = x.baseboards;
		var date;
		var time;
		var address;
});

I have tried everything…Can anyone help?

Hi Athanasios.

I see that you are passing an object as a parameter to the lightbox.
You can try using JSON.stringify to print JS object into a console.

console.log(JSON.stringify(x));

Can you also please share the site’s url to have a closer look?

Regards,
Genry.

https://futurevisionweb.wixsite.com/greagoriascleaning/booking
It’s okay.I used a different approach.
Saved the values on local storage and then load them from the lightbox!

Good to hear.
If you want to get back and investigate the first approach, let us know.

Regards,
Genry.