top of page

Forum Posts

barb
Oct 03, 2020
In Coding with Velo
I have created a data collection of slide presentations (called SlideShare) stored on SlideShare's website. In the data collection I have the presentation title and the embed code for SlideShare for each presentation. I can use the embed code in an html field which works fine. But I want to set up dynamic pages so I don't have to create a dozen new pages with slides. I'm trying to create dynamic pages from the SlideShare data collection. Ideally I want to display the embedded presentation on the detail page. This is the code I currently have (from a prior closed post I found on this forum but was for a URL). I thought I saw something about this somewhere and am hoping someone can help me. I'd rather not build a bunch of manual pages showing the slides and I'd rather keep them on our website. import wixLocation from 'wix-location'; import wixData from "wix-data"; $w.onReady(function () { let item = $w("#dynamicDataset").getCurrentItem(); let embed = item.embedCode; $w("#html1").src = embed;  } ); Error I get in Preview is: Wix code SDK error: The url parameter that is passed to the src method cannot be set to the value . It must be of type url. I can't use type URL for embed code because it isn't a URL. So I have it as a text field. I read something about passing a message to the html field (from the data collection, probably) but now I can't find that post. Thanks in advance for any help. #embed #dynamic page #data collection
0
4
133
barb
Mar 19, 2020
In Coding with Velo
I'm working with support on this problem but I wonder if anyone else has experienced it. I created a test page that has no page code so I could isolate the date problem without having page code to complicate things. (In my last test, I noticed some rows now have blank Activity too when the data collection shows data in that field.) I have a repeater on a read/write data set that shows blank dates on some of the rows (after I click a button to load more entries). Dataset properties (I'm using 3 filters but I have the problem whether the data set has filters or not.) My data collection has 420 entries. 45 belong to the logged-in user. This is a screen shot after I clicked the Show more entries button (for load more). I added a column to the far right that is a text box showing the date field directly from the data collection so I could assure myself that the date was not actually blank in the collection. In this example, the first 5 entries showed dates for the Date Picker. The second 5 entries show 5 blanks and one with a date displayed on the last one. The weird thing is that I just zipped through the data for another user with 163 entries and the dates (and activities) were displaying fine until the 40th row then I started seeing intermittent empty Activity fields (verified to have data via the Content Manager). In the last 15, now I see some with both Activity and Date blank. (Both are required fields but date is set to read-only in this test.) Although support is working with me on this, I'd like to know if anyone else is experiencing it. It might help support figure out what's going on if there are multiple sites with the problem. Thanks in advance for anything you can contribute.
Date Picker (and now dropdown) intermittently showing blank values in repeater content media
0
5
196
barb
Mar 01, 2020
In Coding with Velo
Parsing error with onReady function - I think I'm close! SITUATION: I am trying to filter a data collection by the login user's email address. As Admin (the owner of each of the records) I have added the initial records to the collection and need the ability for my members to update their address information as needed. More than half of our members may not edit their information nor go online at all but I need everyone's info for our roster (which is displayed in a repeater on a page visible to Members). Many of our members are elderly and are not computer savvy. As admin, I add the initial record when I approve the member at registration Here is the code I am using to fill an input field with the logged in user's email address and then trying to use that to filter the data collection which is Read/Write so they can then edit it (on a Member page). I have a parsing error and can't figure out what token is missing to make the code work. I hope someone can take a quick look to help. import wixUsers from 'wix-users'; import wixData from "wix-data"; $w.onReady(function () { $w("#dataset5").onReady( () => { //DocentRoster data set let user = wixUsers.currentUser; let userId = user.id; let isLoggedIn = user.loggedIn; let userRole = user.role; user.getEmail() .then( (email) => { let userEmail = email;  $w('#input40').value = userEmail; $w("#dataset5").setFieldValue("loginEmail",$w('#input40').value); let filter = $w("#input40").value; $w("#dataset5").setFilter(wixData.filter().contains("docentEmail", filter)); wixData.query("DocentRoster") .contains("docentEmail",$w("#input40").value) .find() .then(res => { $w('#box35').expand(); } ); Box35 has the fields I want the user to be able to edit (address, phone, comments, preferences, etc.). All are from the DocentRoster set up as Read/Write with no filter. Thanks in advance if anyone can spot what's I've done wrong.
0
1
49

barb

More actions
bottom of page