top of page

Forum Posts

Yisrael (Wix)
Brewmaster
Brewmaster
Mar 05, 2022
In Coding with Velo
We, at Wix, condemn the violence in Ukraine. Join us with some meaningful ways to help and Stand with Ukraine.
7
4
398
Yisrael (Wix)
Brewmaster
Brewmaster
Oct 19, 2020
In Tips, Tutorials, Examples
In order to use code with your Wix web page elements, you need to ensure that the page is loaded and ready. Why? Well, the server sends a whole bunch of stuff (HTML, CSS, and various scripts) to the browser to have the page rendered for the user to view. While all this is magically happening, the page elements are unavailable - they can’t be accessed by code. The page isn’t ready. Think of it like this… It’s a day off and I’m having my coffee in the backyard, enjoying the view and the morning air. In the background a constant murmur, slightly annoying but I ignore it. Going inside to wash out my coffee mug, the wife utters, “OK, so you really gotta get that stuff done today before it rains.” I shake my head, “Huh! Say what?” I think to myself that perhaps I didn’t have enough coffee. "I’ve been telling you”, the wife continues, "for the last 15 minutes what needs to be done… clean out the shed, rake the leaves, clean out the gutters. Didn’t you hear a word I said?” “Sorry sweetie, I was drinking my coffee and enjoying the view. Now I’m ready, what do you need?” So then, after a deep sigh and a few choice words, the wife (once again) gives me my chores in a language known as WifeScript™.  WifeScript, much like JavaScript, is a procedural language. JavaScript has commands, WifeScript has commands (oh boy does it have commands). Javascript has keywords, WifeScript has choice words. And WifeScript, much like JavaScript, is useless if the target for the procedure is not ready. Let's take a look at a couple of parallel scenarios: My day Let's say that we can express my day with a code file named my-day.ws (ws of course being the extension for a WifeScript file). Can you guess what’s wrong with the following pseudo code? chores.forEach(function(chore) {     perform(chore, grudgingly); }); If you said that I wasn’t ready so nothing happened, then take a beer out of petty cash - you’re right. What that means is that we need to fix the my-day.ws file by checking for when I’m ready. me.onReady( function () { chores.forEach(function(chore) {     perform(chore, grudgingly); drink_beer();    }); }); The onReady() function is called an event handler. What event does it handle? Well, it triggers when I'm ready - and that is a real event. Before I'm ready, it's impossible to access my brain cells using WifeScript. The drink_beer() command is definitely not part of WifeScript. It’s a hack. Wix Web page A web page works much the same way. Let’s look at a code file for a Wix web page: $w(“#greeting”).text = ‘Hello world”; Seems simple enough - right? Well, very simple indeed, since nothing happened. Why? The page wasn’t ready, and as a result, the text element #greeting was also not yet available. So, much like my day, we need to fix the code file like this: $w.onReady( function () {     $w(“#greeting”).text = “Hello world”. }); The above code successfully welcomed the visitor of the web page with a “Hello world” greeting, in a text element called (appropriately enough) #greeting. The onReady() function is called an event handler. What event does it handle? It handles the event of the page being ready. Before the page is ready, it’s impossible to access the screen elements using JavaScript. A web page doesn't drink beer. Hopefully this has shed some light on what exactly the onReady() function is, how it’s used, and why. For more information on the page's onReady() event handler, refer to the documentation. For more information on programming with Velo, see the documentation. For more information on WifeScript, ask your wife. If you are a wife, then you know. And you won't tell. #WifeScript #onReady #Velo
14
5
2k
Yisrael (Wix)
Brewmaster
Brewmaster
Sep 10, 2020
In Coding with Velo
Our Purpose Welcome to the Velo Community! The forum is a friendly and encouraging space for learning, sharing, and collaborating. We have varying degrees of skills in this community, but we all strive to code amazing sites and expand our knowledge through collaboration. Above all, be kind. Remember that everyone was once a coding newbie. The Velo Community Forum is not a support forum. You should not expect to get full code solutions here, and we cannot guarantee your questions will be answered. The community functions best when everyone helps each other. On occasion, you might need more help than the community is able to provide. Check out the Wix Marketplace, where you can hire a Velo Certified Developer to assist you. Community Privilege Being a member of this community is a privilege, not a right. Adhering to the policies and guidelines is a necessity for all members. The community team reserves the right to remove anyone at any time.
16
0
40k
Yisrael (Wix)
Brewmaster
Brewmaster
Sep 10, 2020
In Coding with Velo
Forum policies: Be nice. Inappropriate or offensive content will not be tolerated. The forum may not be used to solicit services for sale or hire. Do not sell, trade, or advertise (to sell or to buy) on the forum. External links are strictly prohibited, unless relevant. Multiple posts on the same subject will be considered spam. Use only English. DO NOT USE ALL CAPS. Posting guidelines: Search the documentation and the forum for answers before posting. Give your post a descriptive title. Create your own new post instead of bumping an old post. Keep your post short, focused, and clear. Format your post using code blocks, bullets, etc. Post only the relevant part of your code. Acknowledge help with likes, best answer, and upvotes.
20
0
2k
Yisrael (Wix)
Brewmaster
Brewmaster
Jun 24, 2020
In News & Announcements
Hi All, Together with Devpost, we’re challenging the Corvid community to build online social distancing solutions for a chance to win up to $3,000. As we rethink the way we interact given the new limitations that social distancing brings, we’re challenging hackathon participants to build websites or web apps using Corvid that create virtual connections to help, support or benefit one another in new ways. Click here to register. Submissions accepted from June 22 - August 3, 2020. Good luck! Corvid Team
3
1
236
Yisrael (Wix)
Brewmaster
Brewmaster
Jun 16, 2020
In Coding with Velo
Who are the Velo Masters? The Velo Masters are designated members from our community who serve as leaders by: Actively moderating and maintaining the culture of the community Answering questions and participating in discussions to help users Creating valuable Velo-related content Conducting webinars and TechTalks  This group has a special connection to the Wix Velo team and helps steer the future of the Velo product through their feedback. If you’re interested in becoming a Velo Master and you exhibit these traits, please fill out this form. Looking forward to hearing from you, The Velo Team and your friendly Brewmaster (Yisrael)
13
0
1k
Yisrael (Wix)
Brewmaster
Brewmaster
Jun 10, 2020
In Velo Pro Discussion
Welcome to the Velo Pro Discussion category, where Velo pros discuss coding techniques, advanced topics, best practices, and secret sauces. We expect this category to be self-supporting and self-moderated. Wix won't provide regular technical support. The Community Management Team will be monitoring this category, and we will bring Wix Product Managers into discussions when deemed appropriate. Wix employees are not to be tagged. Have fun everyone! 🍻
4
0
231
Yisrael (Wix)
Brewmaster
Brewmaster
May 11, 2020
In News & Announcements
We are excited to announce that we have released new pages on the Corvid website. These pages reflect the flow of getting updated with new and upcoming features and will help you track your requested features. You can find the pages under 'Features' in the Corvid website menu. Wishlist Page is the new official platform for requesting new features. You can vote, comment, and track the status of the requested features. Requested Feature Page (which is an inner page of Wishlist) gives you the opportunity to comment, vote, and subscribe to the feature so that you can receive updates. Updates Page shows all of the newly released Corvid features. Roadmap Page is a replacement of the Corvid "coming soon" page, which shows what's next in line to be released.
6
0
224
Yisrael (Wix)
Brewmaster
Brewmaster
May 07, 2020
In Tips, Tutorials, Examples
In this category, you'll learn how to add new or complex functionality to your projects, discover new or better ways to do things, and get tips and techniques to save you time and keep you sane. You'll see expert content from the Velo Masters, community Content Creators, and Wix employees. Plus, feel free to share the efforts of your own creativity! Check out the News & Announcements category if you're interested in new feature & API announcements, Velo in the news, conferences, meetups, online seminars, and more.
12
0
1k
Yisrael (Wix)
Brewmaster
Brewmaster
May 07, 2020
In News & Announcements
In this category, you'll see announcements about new features & APIs, Velo in the news, conferences, meetups, online seminars, local events, and more.
1
0
652
Yisrael (Wix)
Brewmaster
Brewmaster
Jan 12, 2020
In Tips, Tutorials, Examples
Demonstrates Chatbox element API Backend API Links for this example View the “Live” example in a browser page Open the Example template in the Wix Editor Chatbox new feature post About this example This example, from Erez P., demonstrates six usage techniques all of which are labeled in the code. Example 1: Show or Hide the Chatbox when anchor (hidden page location marker) leaves or enters the viewing area of the page Example 2: Maximize chat box when user clicks on a button. Example 3: Show message received in header when message received from admin. Example 4: Show thank you message in header when message sent. Example 5: If an existing product is referenced in the message, navigate to it and display. Use #Tea to initiate the lookup (e.g. #Tea Chamomile as the message). Example 6: Send a message from a footer text input field. Note: Chatbox events (e.g. onMessageReceived, onMessageSent) are not triggered in Preview.
Example: Corvid Chat content media
8
1
1k
Yisrael (Wix)
Brewmaster
Brewmaster
Aug 25, 2019
In Tips, Tutorials, Examples
Demonstrates $w.Dropdown Javascript array functions: map(), unshift() WixDataQuery.distinct() Links for this example View the “Live” example in a browser page Open the Example template in the Wix Editor About this example This example is a variation of the original Search a Database example. Instead of getting dropdown options from a table or dedicated collection of options, the options are retrieved from a regular data collection using the distinct() function of the query which removes the duplicates from the results. The results are then converted to objects and assigned to the dropdown list. When a query uses the distinct() function, only the unique values are retrieved. Like the query’s find() function, distinct() runs the query and returns a Promise of the result. However, unlike find() which returns collection items as objects, distinct() returns a result with the distinct (no duplicates) field values. Note: when using distinct(), there is no need for find(). In fact, using find() with distinct() will cause an error.
Example: Remove duplicates from connected dropdown options using distinct() query content media
7
7
4k
Yisrael (Wix)
Brewmaster
Brewmaster
Aug 18, 2019
In Tips, Tutorials, Examples
Demonstrates Leaflet map library OpenStreetMap HtmlComponent Get Current Geolocation Example links Site View Example Template About this example If you want a map on your site but don’t want to pay for a commercial account or deal with API keys and account security, you can try Leaflet. Leaflet is an open source Javascript library for interactive maps. Used together with OpenStreetMap, you get a lightweight, free, and easy to use mapping solution for your web site. Moshe F. from the FED multilingual team put together a nice little example illustrating a simple use case of a Leaflet map. The HTML/Javascript code for the map is embedded in the HtmlComponent on the page. Since some browsers (Chrome) do not permit geolocation in an iFrame (HtmlComponent), the page's onReady() event handler retrieves the user's geolocation and sends the location as a message to the code in the HTML Component. To add other features, or to customize the look and behavior, see the documentation for Leaflet and OpenStreetMap.
Example: Leaflet Map content media
1
0
2k
Yisrael (Wix)
Brewmaster
Brewmaster
Aug 15, 2019
In Tips, Tutorials, Examples
Demonstrates NPM library / Package Manager wix-location.to() Links for this example Site View Example Template About this example This example uses the PDF Generator API as a tool to create a PDF template that will be used by your site to create a PDF document from site data. To get started, do the following: From the Wix Package Manager in the Editor, install the pdf-generator-api NPM library. Open a PDF Generator API sandbox account. Go to the Account Settings page of your PDF Generator API account. Copy the API KEY, and the API SECRET codes from the Settings page into their appropriate places in the pdfGenerator.jsw file of the example template. To create a template, go to the Templates page of your PDF Generator API account. Click on the New Template button. Select the No Data option. Select Import from the File menu. Import the pdf-example-template.json file. Save the newly created template. Refresh the templates page to see your new pdf template. Copy the template’s ID to the ID field in the code in the pdfGenerator.jsw file. Publish your site. The link returned from the call to the API is an external link. Since wix-location.to() only works for external links on a published site, you will need to publish your site to see the generated PDF.
Example: PDF Generator content media
10
18
8k
Yisrael (Wix)
Brewmaster
Brewmaster
Aug 14, 2019
In Tips, Tutorials, Examples
Demonstrates CheckboxGroup for selection of multiple options within a group .hasSome() to match items whose collection field value equals any of the selected options WixDataFilter Links for this example View Template About this example Shows how to filter a database collection using option groups each with multiple options. This type of filter is often used in online stores. The filter uses the .hasSome() function, which checks if a database collection field contains any of the selected values from each option group.
Example: Multiple Groups Filter content media
5
15
2k
Yisrael (Wix)
Brewmaster
Brewmaster
Jun 24, 2019
In News & Announcements
What is Wix Automations? Wix Automations provides the tools to automate your business process. Every automation consists of three parts: Trigger: The event that triggers the automation. Action: The predetermined response to that trigger. Timing: When the automation is sent. You can send personalized messages when a visitor performs a specific action on your site. For example, when a visitor abandoned the cart in your online store you can send an automatic reminder email 24 hours afterward. You can find Automations under customer management tools in your dashboard. Wix Automations is now integrated with Zapier! Zapier allows you to connect your Wix Automations to more than 100 apps such as Slack, Google Docs, or your Gmail account. Using a Zapier action, users can now integrate any trigger from Wix Automation to any action on Zapier. For example, when a visitor submits a form, I want to add a new record with the submission info on my Google Spreadsheet doc. Or, I want to integrate any store purchase to my external inventory management system. Here’s how Set up your Wix Automation Go to the Automations Dashboard. Click + New Automation. Click the title to give your automation a name. Select a trigger. Click Connect to Third-Party Apps. Choose a time for your automation. Click Activate. Then set up your Zapier account Log in to your Zapier account. Click Make a Zap!. Search for "Wix Automations" under Choose a Trigger App. Select Wix Automations. Click Save + Continue. Click Connect an Account and select your Wix site. Click Allow and Install. Click Save + Continue. Select the automation you want to connect to Zapier. Click Continue. And your Automation is integrated with Zapier! * The feature is currently open to all EN users. We will expand to all languages soon.
New feature: Wix Automations and Integration with Zapier content media
0
4
7k
Yisrael (Wix)
Brewmaster
Brewmaster
Jun 24, 2019
In Tips, Tutorials, Examples
Demonstrates an online polling system for logged in users, thus allowing only one vote per user. Shows the results with an options for showing results even if the user hasn't voted yet. Also has an option for allowing/preventing the user from changing their vote. The example template has a very basic (and incomplete) admin functionality allowing for creating and editing polls. And yes, since you mentioned it, there are a few loose ends. This is really just an example. I stopped as I got precipitously close to falling off the cliff of "full blown app". Have fun! Go to the Online Poll page. See more examples at The Brewmaster's website.
Example: Online Poll content media
2
5
832
Yisrael (Wix)
Brewmaster
Brewmaster
Jun 18, 2019
In Tips, Tutorials, Examples
This example allows registered users to rate recipes when logged in. The user can only submit one rating, but can change it. The list of recipes is displayed on the Home page in a Repeater, which also displays the current rating for each recipe. Clicking a Repeater item opens a Lightbox displaying the recipe and allows the user to give or change a rating. Go to the Ratings by User example page. See more examples at Gramp's Workbench.
Example: Ratings by User content media
5
1
413
Yisrael (Wix)
Brewmaster
Brewmaster
Jun 10, 2019
In Tips, Tutorials, Examples
This example demonstrates how to implement an autosuggest dropdown by using a Repeater with keyboard navigation. Use up/down arrows to make your selection, and the Enter key to accept the selected entry. The selection can also be made using the mouse/trackpad as usual. This project was inspired by a recent forum discussion, Highlight an item Repeater - autocomplete menu, between two amazing users: Mauro Vento Avyno and David - skeptisch.net. Go to the Repeater Dropdown example page. See more examples at Gramp's Workbench.
Example: Repeater Dropdown with Keyboard Navigation content media
5
7
921
Yisrael (Wix)
Brewmaster
Brewmaster
Jun 03, 2019
In Tips, Tutorials, Examples
#dynamic-page #wix-location Page through the dynamic pages using a Next button. When there are no more pages, go back to the beginning. This works the same for the Previous button. When there are no more previous pages, go to the last page. Go to the Dynamic Page Loop example page. See more examples at Gramp's Workbench.
Example: Dynamic Page Loop content media
3
2
679

Yisrael (Wix)

Brewmaster
+4
More actions
bottom of page