I tried adding user-generated content using the tutorial on the Wix YouTube channel, but the tutorial doesn't show what I should connect my submit button to. What should I connect the button to?
The code I've used is:
import wixData from 'wix-data'; function getData() { let query = wixData.query['Comments']; return query.limit(1000).find().then(results => { console.log('getData', results); return results.items; }); } $w.onReady( () => { $w('#dataset2').onAfterSave( () => { getData().then((items) => { $w('#dataset3').data = items; }); }); });
Before you get some answers, you probably should first make a better description of your issue.
1) Which tutorial you were following?
2) Where is your current working (not working code) ???
3) How do look like your database ?
4) Do you use DATASETS, or Wix-Data (coding way) ???
Without all such important informations anybody will be able to help you!
Refill your post again.