Vorbly <Code>
CODING MADE EASY WITH VORBLY
WIX CODE REPEATER DELETE ITEM
Need to delete items from your Wix Repeaters? This tutorial will show you how to add a button to delete database items from Wix Repeaters using Wix Code. Your visitors will be able to sort data displayed in your repeaters. We will provide you with the webpage elements and sample codes required to implement this feature.
THE DEMO
THE ELEMENTS
The Page
Text Elements
-
Page Title ID: #title
-
Menu Element ID: #text1, #text2, #text3...
Wix Repeater: #repeater1
-
Item Name ID: #items
-
Item Quantity ID: #quantity
-
Unit Price ID: #unitprice
-
Final Price ID: #price
-
Delete Button ID: #delete
Button Elements
-
Confirm Order Button: #OrderNow
The Database
Create a database Items (dynamicDataset).
Recommended fields:
-
Item Name ID: items
-
Item Quantity ID: quantity
-
Unit Price ID: unitprice
-
Final Price ID: price
Then link fields to your repeater.
THE CODE
Page Code
export function delete_click(event, $w) {
$w("#dynamicDataset").remove();
}
COMMENTS
I'm a paragraph. Click here to add your own text and edit me. It's easy.