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?