Improving Wix Code Community

ag

The Wix code examples never seem to show the process.

Example: The QueryReferenced() statement shows you how get the list of Items in a multi-referenced field but doesn’t tell you how to insert the list of Items into a Repeater field to display the data.

The Wix code examples should show at least the next step in the process and where to find the details (Wix-???) and if there is nothing else required, it should say that as well.

When you have little or no experience using Wix Code or Java Script, finding the next step, when you don’t know what the next step is, can be very time consuming and frustrating.

Thanks for the opportunity to express this difficulty.

Gerry

[@whitenotesmusic] One thing you probably need to do is get familiar with the API documentation.

The examples are just that, examples. The real power of Wix Code is in the API and how to use and access the features you are referring to is documented in a lot of detail with examples. For example the repeater API

Offers quite granular control and the data property is what you would be looking to make use of.

Try looking at these docs and if you have suggestions afterwards please update your comment.

Cheers
Steve

Hello, can you help me? i need code search from all mine data bases

I have done 2 in person Wix Code worshops. 1 one is my local city and the other was 5 hours away from where I live.

I received the same feedback from both workshops: We want more in person help.

It is a different experience having a person in front of you vs a person on a video screen.

Of course, I am a Wix Ambassador so I already have experience creating Wix workshops in general. But the people want more. I got people that had never used Wix Code with a mixture of people who had. They all prefer hands on coding instead of simply a “presentation”. They want step by step “lets code together” class instead of "look what we built using code"presentation.

The advanced coder will only be interested in advanced workshops ---- if any ---- or mostly just rely on article tutorials, short videos or a community to ask questions. But a beginner that is truly interested in DIY will almost always prefer personal help until they reach an intermediate level of coding and I think in person workshops would benefit a majority of those people when the workshop is run by an educator instead of a presenter.

Anyone can copy, read and present ---- but not everyone can be a teacher.

I met people that knew who I was, knew I had video tutorials ---- yet they said they were to intimidated to try Wix Code so they never watched my videos. They prefered to learn in person to be able to ask questions and interact in real time while the information was fresh in their brain.

:heart:,

Always your Code Queen

Thank you Nayeli. let’s see what 2019 brings :slight_smile:

After being neck deep in Wix Code for the past 4 months building my site i would like to toss this out there. I am constantly on the Wix API code reference, forums, google, etc and here is my problem, and maybe it is just my own ignorance or lack of understanding. While i get the code in the examples provided, understanding what that code part is “saying” and how to use it for an end result is the part that usually kills me.
Let me give an example. Let’s use a popular one like Query. (see code capture below) First it is showing that we need the import wixData API, got it! Then you have the “wixData.query(“myCollection”)” that is straightforward, what database do i want to query. But after that… no clue what .eq means and what do the variables “title”, and “Dr.” refer to? is that the column title in the database? what is the “Dr.” in reference to? .find i can guess that it is an instruction for the code to do just that.

Another annoying point of ignorance on my part i am sure, is the let firstItem = results.items[0]; //see item below statement. Am i supposed to use the names listed in the firstItem is: listing to define the results from the query? and if so how do i write that and what do this parameters refer to in the database if am querying?

So lets say that i get all this query part figured out, a query is only useful if you can use the information that you just wrote this code to retrieve. I built the query to get information that i need to display or use in some fashion . So lets go with the most prevalent for a beginner and that is to display the information in a text box or a table (we will use text box). Well as you can see, and not just this example in all the code examples, that is where it all breaks down. There is nothing to tell me or show me how to apply, in a usable clear cut way, the information that i just worked to obtain like
$w(‘#textbox’).text = item.thisColumnfromyourDatabase;
We get left to decipher how to use the information on our own.

And yes i know i am giving a bit of a dramatic example, but to a person that has never used WixCode, or any code, and has spent their time using pre-built website builders like Godaddy, we are lost. We are now confused and intimidated by a lack of basic understanding of the terms used, the format used,how they work together, the purpose of the terms, and how to utilize them. We need a WixCode for Dummies, LOL.

I have spent over 4 months building my website, and i am almost finally done, and i still had to hire a wix code expert from Totally Codable to get this far. Now i have to admit, i have some fairly complex site features that would push most newbies off a cliff even if they had all the understanding we just talked about, but over 4 months to build…

90% of this time was spent reading the API and various code examples, then googling what 90% of it means, then trial and error for days trying to figure out how to make it do what i want it to do only to find out that i didn’t understand as much about it as i thought it did. Then back to the drawing the board, back to the forums, youTube, API Code examples, and Google. Around and around we go. And god forbid you have an error that you don’t understand, or all your coding and NOTHING happens, no error, just nothing after all that. That is a whole different ball of nastiness.

If you made it this far though my book of a post, or just want the cliff notes version, we need more information on what code means, and how to use that code in a meaningful way.

Lastly, don’t make a video like the “How to create a search for your database video” EVER!

import wixData from 'wix-data';

// ...

wixData.query("myCollection")
  .eq("title", "Dr.")
  .find()
  .then( (results) => {
    if(results.items.length > 0) {
       
let firstItem = results.items[0]; //see item below
    } else {
      // handle case where no matching items found
    }
  } )
  .catch( (err) => {
    let errorMsg = err;
  } );

/*  firstItem is:
 *
 *  {
 *    "_id":          "00002",
 *    "_owner":       "ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb",
 *    "_createdDate": "2017-05-24T12:33:18.938Z",
 *    "_updatedDate": "2017-05-24T12:33:18.938Z",
 *    "title":        "Dr.",
 *    "first_name":   "Jane",
 *    "last_name":    "Doe"
 *  }
 */

I was feeling all of these things almost 2 years ago when I first got started using Wix Code (June 2017). It is for these reasons that I started creating videos to help me remember what I DID … and show others how I did it (while barely starting to even figure out WHY it was doing it and WHAT it even meant).

For the questions you have regarding what does this or that means ---- they are words (or syntax) derived from javascript language or wix code language (words they make up to represent something they want their code to do). There is no ‘glossary’ or ‘dictionary’ per say, where you can look up these things (unfortunately) — there is simply an API reference sheet where one can look up examples of what the code should look like assuming one has the basic javascript knowledge to understand it. <----- I am still learning. A lot. Every day I learn more.

I had to remind myself that I was trying to learn something in ‘2 months’ what took other people YEARS to learn. So I want to remind you … you are trying to build something in an ‘expedited’ timeframe of which takes others YEARS to learn. (But after they learn … takes weeks to build)

If you really really really want to learn more, then you have to do ‘trial and error’ to figure out WHICH way is the best way that YOU can learn.

I have lots of resources like: videos, articles, forum posts, private tutoring and the facebook group. I ONLY have these resources because people learn in different ways. Some people learn by watching, some people learn by reading … and others learn by private one-on-one tutoring. The information stays the same ------ the only difference is the person receiving the information and the way they process it.

After 6 months of learning by myself (from whatever I could pick up) ---- I finally hired a private tutor to answer all of my “WHY” questions that could not be answered by any video or article I found. It took about 4 hours (total, from different days) ----- and then I was “good to go”. I had enough answers to get myself understanding more about Wix Code than I had before. That was a year ago. (Again — I am still learning every day.)

I have learned that it is impossible for me to offer 1 training/educational solution for everyone. It has been a ‘trial and error’ for me to figure it out. I’m sure Wix has many more resources than I do ---- but then again ---- wouldn’t they have figured this out before me ------ because if they did ----- my resources wouldn’t exist, right? So I believe there isn’t one correct or incorrect way of teaching or passing this knowledge. All it takes is time and a different method for each student.

So my best advice to you is: don’t give up, simply try a new (different) way of getting the answers you still don’t have. And as Einstein said:

P.s. I recommend private tutoring for you.

P.s.s. Thank you for visiting Totally Codable :slight_smile:

@dragonlord4469187 Hi there: one of the challenges with any software development is that you have to walk before you can run. Nayeli has made some very good suggestions and help is on the way. To Nayeli’s point though it is really important that you understand the core of javascript (also known as Ecmascript) before diving into a complex project with Wix Code (or any software for that matter).

Even as a 30 year veteran of software development I still find myself using javascript and Wix Code API documentation. You really have to as things change (for better or worse).

If you use a site like w3school’s javascript tutorials (JavaScript Tutorial) you get several things in one spot:

  1. A comprehensive javascript API reference
  2. A decent lesson plan that walks through the language from the basics to fairly complex ideas.
  3. A sandbox to play in. Learning a language, any language English, Spanish, Latin or Javascript, requires practice. The way you learn how to develop software is by doing and making mistakes.

I’ll put a post together to try and describe the Wix Code API syntax in a slightly more friendly way. In fact if you research some of my comments from my profile you will probably see some I have walked through before.

In the meantime I suggest you get familiar with javascript more so than Wix Code as most of your questions are fundamental javascript language questions. Wix Code builds on this.

Cheers

Hi Steve and Nayeli, Don’t misunderstand me, i completely agree with what you have both said, and like i mentioned my site is vastly more complex than the average newbie should even try to tackle TBH. And in reality it is a slightly unfair position to put the WIX Platform in by my post. I was merely trying to offer suggestions to help make Wix better and easier for everyone. Learning coding is exactly like trying to learn a new language, and i think if we can build a better dictionary it will help the understanding. there are many times where i know what i want something to do, i know it can do it, but I only know what a few words mean. That becomes a point of frustration when you know that if you only understood what the code in the API was saying, you would be able to use it more effectively.

And like you mentioned Steve, going through javascript tutorials like the one you listed would most definitely help and something i am going to be doing. BTW, I absolutely love when you explain in detail Steve what the code your helping someone does and what it means and why you want to use it the way you do. I wish more Mods took the time to do this, because as the saying goes, give a man a fish, he eats for a day, teach a man to fish, he eats forever.

@dragonlord4469187 Thank you. Great feedback. Yes I do think a problem is finding the usable nuggets of help from a growing collection of information in the forum. The forum supports tagging
#tagsCanImproveUsabilityWhenTheyAreUsed :wink: But also different people learn in different ways and have different skill sets which can make simplifying things a challenge. Hence this post requesting feedback.

Yes, I agree that more workshops would be great.

One easy fix that I think would make a big difference is to change the main font from light Helvetica neue to something a little more readable. Here’s an article that shares my view https://www.64notes.com/design/stop-helvetica-arial/

On our Shopify app website , we use Open Sans and Lora, which are both free on Google. I highly recommend them.

I would like to suggest you have Wix employees respond to each question/comment that people post in at least some capacity. The vast majority of posts you see here go unnoticed with no response, so then what is the point of posting? I have posted twice and have not received a single comment for either one, and I see many other example of this happening to other people as well.

I work as a customizer email and sms bulk as a marketer, roughly speaking. I like my work, interacting with people, accumulating my social capital. If anyone is interested, visit the bsg.world website there and there will be a description of the project, our portfolio and all team members.

https://www.catch-world.com/copy-2-of-example-3-1
this is my site , the problem is the repeater repeat a filter data more than one so please help me here is the code what i use

import wixData from ‘wix-data’;

$w.onReady( function () {
uniqueDropDown1();

});

export function dropdown1_change(event,$w) {
CityFilter()();
}
function CityFilter (){
$w(“#dataset2”).setFilter( wixData.filter()
.eq(“states”, $w(“#dropdown1”).value)
);

}

export function dropdown2_change (event,$w) {
CFilter()();
}
function CFilter (){
$w(“#dataset2”).setFilter( wixData.filter()
.eq(“districts”, $w(“#dropdown2”).value)
);

}

It would be great if there was a way to filter out the spam within the forums. It is hard enough waiting to get a reply from someone with the community within a reasonable time frame but the spam is quite distracting and offensive. Forum users seeking information get pushed to the next page and really can’t get an answer to their questions when there are 20 abortion pill spam posts above theirs.

@stevesoftwareservice Thank you for starting this open dialogue! My journey with Wix has been a rollercoaster with many wins and some obstacles.

NOTE : For all novice coders who are learning WIX code in order to bootstrap your business-- Steve Cropper is a wix developer expert who is extremely involved in the Wix Community and runs his own Wix Development Consulting company and has been an incredible resource to me. I have retained his services to help with rewrite or write code from scratch to improve sections of my site. I highly recommend him and feel free to reach out to me to learn more about my experience and ask any questions.

To answer some questions, Steve - see below!

How can Wix improve Wix Code documentation and your access to it?

  • providing more editor examples where the code is pre-written - these should be linked more within the forum as responses to repetitive questions (pinned to the top so people easily see them) I really like when something says (“SOLVED”) in the thread header b/c I will look at those first.

Do the examples and the articles Wix offers meet your needs? If not is there something Wix can do to make them more usable or accessible?

  • usually … just looking for more…for novice coders this helps to create lean/efficient code that we may not otherwise know how to create.

Should there be a Wix Code specific Blog by Wix, complimenting the already active, and excellent Community Bloggers? If so what topics should be covered.

  • personally i think a seperate blog site could be confusing - i find that its easier if the documentation/knowledgebase is centralized within the forum. I think that if there was a section within the forum that almost ranked/showed top contributors to the community forum then we could know who to direct questions to to try and get an answer. Maybe if there was a way to also distinguish what areas those wix experts/contributors specialize in - we could better direct our questions/posts

Would live webinars be useful?

  • Potentially - but would be looking for something that was quick and to the point (maybe questions could be submitted prior to the webinar so that they can be addressed within the webinar)

how to hide a element in an anchor page?

I am making a single page website with the help of anchor page. I have added a static element which is common on all the anchor pages but I want to remove that element in few anchors pages. I tried using corvid but it removes that static element from all the pages.
I tried using a single line code " $w(“#myElement”).hide(); ", but it removes the static element from all the pages.
Please provide me with a solution as soon as possible so that I can continue designing my website.

Have faced some forum notification system errors!