top of page

Forum Posts

alloutapparel
Mar 18, 2022
In Coding with Velo
I am trying to change to colour of a line when clicking on a button but not sure how? .style does not work so not sure what to use. Any help would be greatly appreciated! Thanks, export function corporate_click(event) { $w('#corporate').style.color = '#fff'; $w('#corporateLine').style.color = '#fff'; $w('#allNewsLine, #productLine, #communityLine').style.color = '#87878C'; $w('#allNews, #product, #community').style.color = '#87878c' $w('#section37, #section39, #section40').collapse(); $w('#section38').expand(); }
0
0
13
alloutapparel
Mar 07, 2022
In Coding with Velo
Hi, I'm trying to set a button to display the member's name when logged in. However, the code has broken the rest of my code and also does not work and I'm not sure why? Would anyone have any ideas? See code below. export function myGetCurrentMemberFunction(options) { return currentMember.getMember(options) .then((member) => { if (wixUsers.currentUser.loggedIn) { var firstName = `${member.contactDetails.firstName}`; $w('#logIn').label = "hi" + firstName; } else { $w('#logIn').label = "login"; } return member; }) .catch((error) => { console.error(error); }) }
0
7
92
alloutapparel
Feb 20, 2022
In Coding with Velo
I have a custom member's page where I would like to print the user's first name in a string. For example, let's say the user is called Bob. I would like to print a string which says 'Hi, Bob!'. This is my code which I have wrote currently to print the user's ID. How can I update this code to print the user's name instead? import wixUsers from 'wix-users'; let name = wixUsers.currentUser.id; $w.onReady(function () { if(wixUsers.currentUser.loggedIn) { $w('#text293').text = 'Hi,' + name + '!'; } });
0
1
38
alloutapparel
Feb 12, 2022
In Coding with Velo
I have an image in a repeater for a reviews section. I have the image linked to the appropriate field in the dataset. I have the image set neither as 'collapsed' or 'hidden'. I have the code: if(itemData.image) { $w('#uploaded').expand(); } else { $w('#uploaded').collapse(); } and the image will not appear in any repeater box. Upon hitting a 'load more' button, when I get to a review within image uploaded it will show the image. But, every image will appear as well with a default selected image. Not sure what I am doing wrong?
Collapse and expand image if image has been uploaded in a form content media
0
1
35
alloutapparel
Feb 11, 2022
In Coding with Velo
Is it possible to set a lightbox not to close at all? For example, if a field is not filled in and they click the 'submit' button', I do not want the lightbox to close.
0
2
150

alloutapparel

More actions
bottom of page