top of page

Forum Posts

ict
May 23, 2020
In Coding with Velo
Hi, I have a dynamic page with a button. With this button I want to open a lightbox. I tried and tried but not working. Now I have hardcoded the name of the lightbox in it, and even then it's not opening. Am I missing something? I have set the name in the properties of the lightbox to HRMCoaching. I put the code like hereunder. And then in preview click the button.>> Nothing happens Any suggestions? import wixData from 'wix-data'; import {wixWindow} from "wix-window"; import {local} from 'wix-storage'; $w.onReady(function () { $w('#button8').onClick((event)=>{                  wixWindow.openLightbox('#HRMCoaching')                });  /* $w.onReady(function () {  let dienst = local.getItem('#projectname2');     console.log(dienst)     wixData.query("Projects")         .eq("title", dienst)         .find()         .then(results => {  let items = results.items;  let firstItem = items[0];  */ /* $w(`#button8`).onClick((event)=>{                  wixWindow.openLightbox("HRM Coaching");                 //wixWindow.openLightbox(firstItem.lightbox);         //});         */ //}); });
0
7
51
ict
May 21, 2020
In Coding with Velo
Hi, I have seen some posts but they were all with repeaters. My situation is simpeler, but could not get the code right (yet) I have a single dynamic page, connected to a database. Thus every page is 1 record from the database, so no repeaters etc. Amount of pages is according to # of records in database (14 in my case). I have also made 14 lightboxes Now I want a button on that dynamic page which opens a specific Lightbox, depending on the name in the 'lightbox field' in the dataset of the Dynamic page. I have put the name of the lightbox (fieldname = lightbox) in a separate field in the record in the database. Below my code: import wixData from 'wix-data'; import {wixWindow} from "wix-window"; import {local} from 'wix-storage'; $w.onReady(function () { let dienst = local.getItem(title);     console.log(dienst)     wixData.query("Projects")         .eq("title", dienst)         .find()         .then(results => { let items = results.items; let firstItem = items[0]; $w(`#button8`).onClick((event)=>{                 wixWindow.openLightbox(firstItem.lightbox);         });     }); }); Can anybody point me in right direction pls? Even better would be designing 1 dynamic Lightbox form and let the fields be populated by pushing the data from the primary Dynamic page. But that's for the advanced ;) Thanks!
0
3
881
ict
Mar 05, 2020
In Coding with Velo
Hi I have setup some dynamic pages and all is connecting fine. On 1 page however I need to do more with layout. But it seems I can only put "plain text" in the Dataset. And that is treated as 1 big textblock. The best is to explain with example on the old site with good layout: https://www.maatwerkarbeidsadvies.nl/portfolio-items/hr-advies-op-maat/ The best I could find now is to cut all texts in pieces, so in my Wix site this pae exist of 12 different textfields, connected to 12 different field in dataset. Not very dynamic ;) Can anybody help me out pls?
0
5
459

ict

More actions
bottom of page