top of page

Forum Posts

May 21, 2023
In Coding with Velo
Hi, I'm building a course collection website, each course has a title, course description and sample image. I want users to be able to add their own courses to the collection. In the collection, the sample image is of the image type (not text), but consists only of external urls (to keep the database small). That's where my problem starts. I want users to add an external url of the image, and not upload their own image to the database. With the manual "connect to.." button in wix I can't connect a text box to the image field type in a database, so I need to code. Until now; I have this: export function loadFormCreatorButton_click(event) { let image = { "_id": "image", "image": $w('#inputImage').value } wixData.insert("Courses1",image) } This loadFormCreatorButton is connected to also Submit the Title and CourseDescription texts on the same page. Unfortunately, a click adds 2 new entries to Courses1, while it should be one (I want to submit title, course description and image with 1 click of the button). Is it possible to do both inserts at the same time? Else I would have to insert it all with javascript, but that makes the code more complicated. Thanks!
0
3
52
May 10, 2023
In Velo Pro Discussion
Hi, I'm encountering some kind of strange bug (I suppose) in Wix. I might be wrong, I'm curious about your opinion about it. On my website, I'm busy building a dropdown with checkboxes, similar to the Wix Example that can be found here: https://www.wix.com/velo/example/checkbox-dropdown Once, when I clicked the site above, I pressed "Edit now" and could see and test the code of the Wix Example, and everything was working fine. But somehow, at one moment the checkboxes in the dropdown disappeared and I have not been able to get them back. Remember, we're talking about an empty example of the above website, clicking exactly that link. I started on my desktop, a -most recent- Windows 11 device with the most recent Edge browser. What I've tried to do to get to a clean, working example using the link below again: Logging in and out, removing internet cache from the browser disabling site cache in Wix in the settings of the example page -> advanced settings -> manually control caching for this site -> disable cache going in an InPrivate tab, go to the above link, login with my account (which is required) and re-open the empty, fresh page. I tried all of the above a couple of times but still; the container seemed messed up and checkboxes don't appear anymore when I test the code using preview or publish. Then I also discovered that every time you open an Example, Wix actually makes a new website in your account when you edit it, and you can find/edit it under My Sites. But remember; every time you click the link, Wix makes a new copy. So the first time I found out about it, I found My Site 2 up to My Site 8, all were copies of the exact same sample code. This triggered me of course. Could this be an account-bound caching bug in Wix, instead of a caching problem in my own browser? So I tried: 4. Remove all the my sites, removed all the removed my sites from trash, and re-open the page. It did nothing. 5. Do the same thing and then log in on my MacBook Pro (on Ventura with the most recent Safari webbrowser). The exact same problem emerged; the check boxes don't appear and the container/repeater are not lined out nicely. 6. So, I asked a friend: did Wix update their example with bad code that doesn't work anymore? Within 3 minutes, he replied 'nope, this code works fine what's the problem with it. did you try to remove your cache...' Yes I already did... 😅. So, to be short, it seems to me that there's some kind of account-bound cache that's the problem here that makes Wix produce a faulty version of the above Example code because somehow it got messed up in my account. So it seems like a Wix bug to me, but of course I'm curious if anyone has another solution or suggestion that I can try. Thanks for the help!
0
1
8

More actions
bottom of page