top of page

Forum Posts

Manny Camacho000
Aug 21, 2018
In Coding with Velo
I noticed the forum now has a member-to-member chat. How do I add th at to my website? Thanx.
0
2
116
Manny Camacho000
Aug 07, 2018
In Coding with Velo
How do I scale down the entire content in an iframe? I'm displaying a goggle sheets page but the sheet is really big so I need to scale it down a little so all the contents are visible without having to scroll to the sides. How do I achieve that? Thanx.
0
5
87
Manny Camacho000
Jun 10, 2018
In Coding with Velo
Hi, I'm using a repeater to create a comment section, I want each site member to be able to leave a "like" on whatever comment the choose if they want to. How do I achieve that? Whatever help will be much appreciated.
2
5
500
Manny Camacho000
May 02, 2018
In Coding with Velo
I'm using a repeater to create a comments section, each comment has its own id, I'm trying to fetch each comment's individual id and insert it in a different collection by clicking on 'Click here'. The comments are stored in the 'Comunidad' collection and the id I'm trying to fetch needs to be inserted in the 'MeGusta' collection. Here's what's going on: import wixData from 'wix-data'; export function text53_click() { let myId = $w("#container1").id; // "myElement" let toInsert = { 'Conversación':myId }; // add the item to the collection wixData.insert("MeGusta", toInsert); } The word 'container1' gets inserted in the database instead of the comment id. Help please! :( Thanx
Fetch repeater id and insert in a different collection.  content media
0
5
202
Manny Camacho000
Apr 12, 2018
In Coding with Velo
Hello community! I'm using insert() for users to input comments to a database. When the comment is created it creates an ID for itself, I want that same ID to be inserted on a different field in the same row, how do I do that? Here's what's going on: The 'Comentar' button is button 8 when clicked whatever is typed in the input box is inserted in the 'comentarios_1' field and the user id is inserted in the 'title' field when the new row in the database is created. However, I need the ID of the comment that was created to be on the [Conversación] field as well, So I pretty much need it twice in the same row. I hope I make myself clear. import wixData from 'wix-data'; import wixUsers from 'wix-users'; export function button8_click() { const currentUser = wixUsers.currentUser; if (currentUser.loggedIn) { currentUser.getEmail().then(email => { wixData.query('Afiliados').eq('email', email).find() .then(() => { let userId=wixUsers.currentUser.id; const toInsert = { 'comentarios_1':$w('#textBox1').value, 'title': userId, }; // add the item to the collection wixData.insert("Comunidad", toInsert) .then( () => { $w('#textBox1').value=''; $w('#button8').disable(); }); }); }); } } Thanx!
Insert ID twice in the same row.  content media
0
13
253
Manny Camacho000
Apr 03, 2018
In Coding with Velo
I'm using the below code and a repeater to make a comment section. At the top right corner of my page, I'm displaying the current user's profile pic, I want that pic to appear on every comment made by the current user but it's not working, it does it only for the first comment even if the comment doesn't belong to the current user. For this scenario, 'Afiliados' is the name of the collection where the user's profile info is stored and '#dataset1' is the collection where the comments are being stored. Someone please help! Thanks. import wixData from 'wix-data'; import wixWindow from 'wix-window'; import wixUsers from 'wix-users'; //Current user image $w.onReady(function(){ if (wixWindow.rendering.env === "browser") { const currentUser = wixUsers.currentUser; if (currentUser.loggedIn) { currentUser.getEmail().then(email => { wixData.query('Afiliados').eq('email', email).find() .then(result => { const item = result.items[0]; $w('#image31').src = item.image; $w('#dataset1').setFieldValues( { 'ImageURL': $w('#image31').src }); $w('#dataset1').save() .then( () => { $w('#dataset1').refresh(); }); }); }); } } });
'setFieldValues' does not populate repeater correctly. content media
0
4
219
Manny Camacho000
Feb 25, 2018
In Coding with Velo
What's the code for displaying a dynamic page inside an iframe? The page I'm trying to load is something like this: https://www.example.com/stuff/${wixUsers.currentUser.id} How do I display that? Thanks.
0
8
329
Manny Camacho000
Feb 12, 2018
In Coding with Velo
I'm using the below code to populate a table but it's not working: export function datePicker1_change() { let searchString = $w("#datePicker1").value; $w("#dataset1").setFilter(wixData.filter() .eq("_createdDate", searchString)); } Why? Anyone? Thanx
0
8
266
Manny Camacho000
Feb 04, 2018
In Coding with Velo
Is there a way to fetch a member's profile pic from Wix Forum? For example, the current user's profile pic in the forum.
1
2
104
Manny Camacho000
Feb 02, 2018
In Coding with Velo
I'm using a repeater to display comments made by different users, I created an edit button in the repeater so every registered user gets to edit their own comments after post if they so choose to. Problem is everyone is able to click on any edit button wether they typed the comment or not, how do I show only the buttons for the comments made by the current user viewing the page and hide the others? Is that possible? Here's what I got: 1. I'm working on dynamic page, the URL contains the user id. 2.The user's image, email, ID, etc... are being stored in the 'Afiliados' collection. 3. I set the button to be hidden on load and enabled it by default in the properties panel. 4. The comments are being stored in my 'Comunidad' collection, as a result each comment has its own URL and its own ID (that's separate from the user id) 5. When each user makes a comment the user id gets inserted in the title field of my 'Comunidad' collection and an ID is also generated for each comment. import wixData from 'wix-data'; import wixUsers from 'wix-users'; $w.onReady(function () { const currentUser = wixUsers.currentUser; if (currentUser.loggedIn) { currentUser.getEmail().then(email => { wixData.query('Afiliados').eq('email', email).find() then(() => { $w("#repeater1").onItemReady( ($w, itemData) => { itemData=$w("#button13").show(); }); }); }); } }); When I view the page I can see the repeater is showing all of the edit buttons and not just the ones that belong to the comments made by the current user. Could anyone help me out on this one please? Thanx
Display certain buttons in repeater, onItemReady, itemData. content media
3
2
806
Manny Camacho000
Jan 25, 2018
In Coding with Velo
Does anyone here know how to make a like button? What the code would be for that? Thank you.
0
6
1k
Manny Camacho000
Jan 24, 2018
In Coding with Velo
I'm using a repeater to display comments made by different users, I created an edit button in the repeater so every registered user gets to edit their own comments after post if they so choose to, however every registered user is able to click the edit button every time whether they typed the comment or not. How do I enable only the buttons for the comments made by the current user and disable the others? Is that possible?
Enable edit buttons for comments based on current user.  content media
1
26
550
Manny Camacho000
Jan 20, 2018
In Coding with Velo
I need to send some data to my 'Comunidad' collection. Upon hitting the submit button I need to capture the member ID, profile image, and username which are located in my 'Afiliados' collection. Also, I have a text box for comments set up but when I click the submit button three different rows are created in the collection, two rows for ID, profile image, and username, and another one for the comment. I don't need three different rows to be created I need everything to go to the same row. Does anyone have a solution for this? :( import wixUsers from 'wix-users'; import wixData from 'wix-data'; $w.onReady(function(){ let currentUser = wixUsers.currentUser; if (currentUser.loggedIn) { currentUser.getEmail().then(email => { wixData.query('Afiliados').eq('email',email).find() .then(result => { let item = result.items[0]; wixData.insert('Comunidad',{ 'nombreDeUsuario':item.nombreDeUsuario, 'imageUrl':item.image, 'title':item._id}); }); }); } });
wixData.Insert( creates three different rows in collection. content media
0
11
4k
Manny Camacho000
Jan 17, 2018
In Coding with Velo
So far I'm able to get the user ID and use it in an input field on a form with the code I have. How do you do the same for any other field? like for example the owner field, or the image field, or any other? This is what I have: import wixUsers from 'wix-users'; $w.onReady(function () { let user = wixUsers.currentUser.id; $w('#input1').value = user; }); It automatically fills in the first input on the form. I want to do the same on the second and third inputs but I want to retrieve other fields, like username, and image, etc... How do you do that? Help please!
Retrieve field data from collection and put it in input form content media
1
12
4k
Manny Camacho000
Jan 05, 2018
In Coding with Velo
Help please! This is what I got so far. Why is it not refreshing? import wixData from 'wix-data'; import wixUsers from 'wix-users'; import wixLocation from 'wix-location'; $w.onReady(function(){ const currentUser = wixUsers.currentUser; if (currentUser.loggedIn) { currentUser.getEmail().then(email => { wixData.query('Afiliados').eq('email', email).find() .then(result => { const item = result.items[0]; $w('#html1').src = item.title; setTimeout(function(){ wixLocation.title.reload(1); }, 5000); }); }); } });
0
20
2k

Manny Camacho000

More actions
bottom of page