top of page

Forum Posts

clairence
Jun 06, 2019
In Coding with Velo
I use the same code in several pages, which only displays database items that are Display==true(boolean). It works on all pages, as far as I've seen, but it's not working on one page and I can't figure out why. this works: import wixData from 'wix-data'; import wixLocation from 'wix-location'; $w.onReady(function () { // HIDE / SHOW OTHERs wixData.query("EACexhibits") .eq("display", true) .eq("current", true) .eq("whichGallery","other") .find() .then((results) => { this does not work. all items display, whether display==true or false. // GET WIX DATA READY import wixData from 'wix-data'; import wixLocation from 'wix-location'; $w.onReady(function () { //if no data, hide the repeater - second Friday wixData.query("EACsecondFriday") .eq("display", true) .find() .then((results) => { Any thoughts would be appreciated. Thanks.
0
4
233
clairence
Apr 15, 2019
In Coding with Velo
I have a Date field in my database that may or may not be required for certain items. And that requirement is flexible; it may be required and then change to not required. Once I have a date entered in a Form (or the database itself), how do I edit the Date/Time field to be blank again? Thanks.
0
3
28
clairence
Mar 27, 2019
In Coding with Velo
It would seem I deleted the Events page from my site editor a month ago when I was cleaning house. But I now need to make adjustments to layout and styling. I can't really revert to an earlier version to get it back because I've made hundreds of adjustments since then. Is there a way to reestablish an Events page like the original? Would I need to uninstall and then reinstall the Events app? Thanks.
0
0
9
clairence
Mar 11, 2019
In Coding with Velo
I am still very new to this. I tried the following code, which works but doesn't. There are two issues here. First, it takes literally 10-30 seconds from page load until the date areas are populated. That won't work, as visitors will be off elsewhere long before. Second, it formats the date as desired, but the date doesn't change from item to item (same date in each repeated item). Suggestions? Thanks. //after page load $w.onReady(function () { // Get the date from the date field of the current item //const classstdate = $w("#dataset10").getCurrentItem().startDate; //const classendate = $w("#dataset10").getCurrentItem().endDate; const wkshpstdate = $w("#dataset8").getCurrentItem().startDate; const wkshpendate = $w("#dataset8").getCurrentItem().endDate; const spevstdate = $w("#dataset9").getCurrentItem().startDate; const spevendate = $w("#dataset9").getCurrentItem().endDate; const ctastdate = $w("#dataset7").getCurrentItem().callBegins; const ctaendate = $w("#dataset7").getCurrentItem().deadline; // various date display configurations const MoDa = { month: "short", day: "numeric" }; // Jan 18 const HrMn = { hour: "numeric", minute: "numeric" }; // 12:45 const DOW = { weekday: "long" }; // Monday const DOWMoDa = { weekday: "long", month: "short", day: "numeric" }; // Monday, Jan 18 const Full = { weekday: "long", month: "short", day: "numeric", hour: "numeric", minute: "numeric" }; // Monday, Jan 18, 12:45 // Set the text element to display the date using the user's settings //$w("#text36").text = classstdate.toLocaleDateString("en-US", Full); $w("#text39").text = wkshpstdate.toLocaleDateString("en-US", MoDa); $w("#text52").text = wkshpendate.toLocaleDateString("en-US", MoDa); //if(spevstdate !==null){ $w("#text64").text = spevstdate.toLocaleDateString("en-US", Full); //} //$w("#text65").text = spevendate.toLocaleDateString("en-US", Full); $w("#text47").text = ctastdate.toLocaleDateString("en-US", MoDa); $w("#text49").text = ctaendate.toLocaleDateString("en-US", MoDa); });
0
4
213
clairence
Mar 10, 2019
In Coding with Velo
Hi. I see there are some examples for setting the display of dates from database using code that targets specific page elements by ID. But I want to know if there's a way to set a site-wide function that offers different format options - Month-Day, Month-Day-Time, DOW-Time, etc. I am surprised that Wix doesn't have something like this built-in. Thanks.
0
0
13
clairence
Mar 07, 2019
In Coding with Velo
In my zeal to get stuff done, I created all my dashboard pages as Site pages (not knowing at the time what I was doing). Is there a way to convert them from Site pages to Dashboard pages, or do I need to recreate them all? Thanks.
0
2
51
clairence
Mar 07, 2019
In Coding with Velo
When I first started building my site, I didn't really understand how datasets worked so I created a lot of them. Now that I have pretty much figured out my system, I want to delete the datasets I am not using any more, but I'm not sure if there are straggler connections. Is there a way to find out where a dataset is accessd on my site other than going to each page and checking? Thanks.
0
0
10

clairence

More actions
bottom of page