When a user inputs data in a form and i have it set up to build a table with that information, is it possible to make the table headings sortable? for example lets say 10 people fill out my form and i want to sort the table by home state, is there a way to do this?
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
Try these two resources. They worked for me when I had a table on my site.
https://www.youtube.com/watch?v=-nMeGbXAdrc
https://www.wix.com/code/home/forum/advanced-tips-tricks/let-users-filter-data-in-a-table
Right now I don't believe that a table can be sorted, but it can be filtered using user input fields like drop downs. Those fields could be populated from a .js file like in this example:
https://www.wix.com/code/home/example/Cascading-Form
you can then do an on change event that changes the table results. Something like this:
export function input item1_change(event, $w) {
wixData.query('Database name')
.contains('field key in database for home states',$w('#dropdown id').value)
.find()
.then(res => {
$w('#table id').data = res.items;
});
}
you can keep a static sort on the table by going manage data set and sort at the bottom.
You are welcome! Let me know how it works out.
thank you!
yes, the user to sort
Matt do you want the user to be able to sort it or do you want to have a set sort on the table?