top of page

Forum Posts

TomTimp
Oct 15, 2019
In Coding with Velo
Hi all I followed wix tutorial "Search a Database" with search box and a dropdwon filter. All works fine APART form one thing. When I try to code it to search two fields in the database it doesn't work. If someone inputs a search criteria in the "Search Boxr" I need to search / filter results from "TWO" fields within the database i'm connecting it to, not just one. Everything I've tried breaks the code and doesn't work. When I try to add an additional filter for filtering the "SKILLS" field of the databse together with the "JOB TITLE field it won't work. Any advice / help would be more than appreciated. Code I have to date is as follows import wixData from "wix-data"; $w.onReady(() => { loadLIVEJOBS(); }); let lastFilterjobTitle; let lastFilterlocation; let debounceTimer; export function searchtitle_keyPress(event) { if (debounceTimer) { clearTimeout(debounceTimer); debounceTimer = undefined; } debounceTimer = setTimeout(() => { filter($w('#searchtitle').value, lastFilterlocation); }, 500); } export function searchlocation_change(event) { filter(lastFilterjobTitle, $w('#searchlocation').value); } function filter(jobtitle, location) { if (lastFilterjobTitle !== jobtitle || lastFilterlocation !== location) { let newFilter = wixData.filter(); if (jobtitle) newFilter = newFilter.contains('jobTitle', jobtitle); if (location) newFilter = newFilter.contains('location', location); $w('#livejobsdata').setFilter(newFilter); lastFilterjobTitle = jobtitle; lastFilterlocation = location; } } function loadLIVEJOBS() { wixData.query('LIVEJOBS') .find() .then(res => { let options = [{ "value": '', "label": 'All Locations' }]; options.push(...res.items.map(location => { return { "value": location.location, "label": location.location }; })); $w('#searchlocation').options = options; }); }
0
2
47
TomTimp
Oct 15, 2019
In Coding with Velo
Hi folks, Struggling to get my head around this one. I have a custom sign-up and I have my "new members" set to "manual approve" When someone new signs-up to my site I need to collect more information and add that in to another database, NOT in to the wix CRM / Customer contact. Is this possible? On my signup lightbox page I simpley adde this code. But nothing happens: export function button2_OnClick(event) { $w('#dataset1').setFieldValue('employer', $w('#employer').value); $w('#dataset1').setFieldValue('jobTitle', $w('#jobtitle').value); }
0
4
435
TomTimp
Sep 27, 2019
In Coding with Velo
Not sure if this is possible - I might be over thinking this. I want to be able to set a Dynamic page to display only information for the "Owner" / "logged-in user". Tom
1
1
163
TomTimp
Sep 27, 2019
In Coding with Velo
Losing the will to live with this one. Tried so many ways and just when i thought I got it, I'm back to square one. All I want to do is be able to add and show specific data to specific members, but every member will be different. Basically I have people apply to jobs. them applications are stored in a database "Applications" - I check the applications and then want to present all relevant applications to my clients so when they login and they who's applied to their jobs. Why am I finding this so hard to do?
0
1
287
TomTimp
Sep 19, 2019
In Coding with Velo
Hi folks, just wanted to ask a quick question so I dont spend hours trying sometthing that isn't possible. I want to create a saved search, which i have seen the tutorial @Yisrael (Wix) posted. However, is it possible to create this so that it saves when a user logs-in reagrldess where they login from? Hope this makes sense? Cheers, Tom
0
6
48
TomTimp
Sep 04, 2019
In Coding with Velo
I'm back - I utilised @Code Queen Nayeli code for adding a search to my site because it allows you to add a search bar on the home page and direct you to results with another search bar. What I'm struggling to do is add a filter to further filter the search using a drop down. I know wix have a search code tutorial, but wanted to know before starting again is it / would it be possible add code to my existing code? Or just start over? The code I have is as follows: import { local } from 'wix-storage'; import wixData from 'wix-data'; $w.onReady(function () { var sameWord = local.getItem("searchWord"); $w('#searchBar').value = sameWord; $w('#searchBar').placeholder = sameWord; $w('#dynamicDataset').onReady(function () { search(); }); }); export function searchButton2_click() {search();} function search() { wixData.query('LIVEJOBS') .contains('jobTitle', $w('#searchBar').value) .or(wixData.query('LIVEJOBS').contains('location', $w('#searchBar').value)) .or(wixData.query('LIVEJOBS').contains('skills', $w('#searchBar').value)) .find() .then(res => { $w('#repeater1').data = res.items; }); } $w.onReady( () => { $w("#dynamicDataset").onReady( () => { $w("#repeater1").onItemReady( ($item, itemData, index) => { let theItem = itemData.role; var shortrole = theItem.substr(0,100); $item("#RoleText").text = shortrole + " . . . "; }); }); Any advice much appreciated Cheers Tom
0
3
261
TomTimp
Sep 02, 2019
In Coding with Velo
Guys this is driving me nuts, losing the will to live with this. People were trying to help me but due to the spam attack my profile and posts were cleared. ISSUE: I have two member role set up, "Client" and "Professional" When a member logs in Iwant them to be redirected to a different member dash/profile page depending on their role. I'm using the standard login menu/button and tried the following code in both the page and site panel. PLEASE NOTE: I'm totally new to coding, second week in, so complete novice. Code I am using is as follows: import wixUsers from 'wix-users'; import wixLocation from 'wix-location'; import wixData from 'wix-data'; wixUsers.onLogin( (user) => { let userId = user.id; let isLoggedIn = user.loggedIn; let userRole = user.role; if(userRole === "Client") {wixLocation.to("/client-dash");} if(userRole === "Professional") {wixLocation.to("/candidate-dash");} });
0
43
623
TomTimp
Aug 30, 2019
In Coding with Velo
Guys, I'm struggling big time (totally new to coding, just over a week in but trying). I have two user / member roles set up "Employer" and "Employee" I want each to be directed to different profile pages upon login. I've tried doing this using the Wix API How do I code so that it determins where to send each user depening on their role when logging in? Apologies, just really struggling with this. Tom
0
6
71
TomTimp
Aug 29, 2019
In Coding with Velo
Folks, for the vast majority of you this will probably be simple code, but after 4 hours I'm scratching my head. I want to input the users first name in to a title, i.e. Bob, good luck. Usually, I've been putting the first name on a seperate line and it's simple, just add a dynamic value, but trying to do it on the same line followed by a comma "," and then the rest of the sentence is testing me. p.s. I've been coding for just over a week, so complete novice. Any help appreciated guys.
0
1
56
TomTimp
Aug 23, 2019
In Coding with Velo
Looking for some advice on Member Area When I "add member area" with wix automatically sets up pages etc. But on each page the menu bar appears and when i try to customise a page I can't delete the menu bar. Would I be better off setting up a member area from scratch using wix code as in this tutorial "Building You Own Members Area" (https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area) and customise all pages myself? Really struggling to know which would be better in the long run. 🙄 Any advice welcome !!
0
0
19
TomTimp
Aug 23, 2019
In Coding with Velo
Guys, I'm using Ascend automated emails to notify pending members their membership is waiting to be validated, then an automated email to say membership approved. HOWEVER, wix is still sending another email when approved from this address: <no-reply+67557f2c-0e26-4b16-bcad-77729f388d4c@site-members.com> How do I remove this one so that only my Ascend automations are sent? Any ideas guys?
0
0
56
TomTimp
Aug 17, 2019
In Coding with Velo
Problem connecting an image to another page So I have a page with a "job description". When you press apply you are sent to an "application page" I've set it so that information from the job page automatically fills in two user input and a head using session memory. I'm trying to get it to also transfer the same logo over from the previous page but everything I've tried isnt working. The code I am using is session.setItem('logo', $w('#Logo').image) It's not recongising this, red flags it???? On the second page I am using let logo = session.getItem('logo'); $w('#CompanyLogo').value = logo; Again it's red flagging???? 😬😬😬 Any ideas
0
0
39
TomTimp
Aug 13, 2019
In Coding with Velo
Hi guys, Hopefully someone may help. I've followed the corwiv tutorial "Show more link" to expand and collapse text on a dynaic page. I've got it working BUT the only problem being it's showing the (I think) HTML code too when you view it. The data it's collecting is from a fiel that is rich text. Not sure if that is an issue? Here's the code I've used. let fullText; // variable to hold the full text let shortText; // variable to hold the short version of the text $w.onReady(function () { $w("#CompanyProfile").onReady(function () { // how many characters to include in the shortened version const shortTextLength = 40; // set the fullText variable to be the text from the collection fullText = $w('#CompanyProfile').getCurrentItem().about; // if no text to display, collapse the text element and the button if (!fullText) { $w('#TextExp1').collapse(); $w('#button1').collapse(); } else { // if the text has fewer or the same number of characters as shortTextLength characters, display it as is and collapse the "Show More" button if (fullText.length <= shortTextLength) { $w('#TextExp1').text = fullText; $w('#button1').collapse(); } else { // create the shortened version of the text and display it in the text element shortText = fullText.substr(0, shortTextLength) + "..."; $w('#TextExp1').text = shortText; } } }); }); export function button1_click(event) { if ($w("#TextExp1").text === shortText) { // if currently displaying short text, display the full text $w("#TextExp1").text = fullText; $w("#button1").label = "Show less"; } else { // if currently displaying full text, display the short text $w("#TextExp1").text = shortText; $w("#button1").label = "Show more"; } } This is the results I get first image collapsed, second expanded text. You can see in the text it shows this <p style="font-size:18px"><span style="color:#3c3c3c"><span style="font-size:18px"><span style="font-family:helvetica-w01-light,helvetica-w02-light,sans-serif"> : Help would be so much appreciated guys !! Tom
Expand / Collapse text on dynamic page *HELP* content media
0
1
206

TomTimp

More actions
bottom of page