I want to remove a item from the list after click on button in cms hub.
Hi, could you please add more details to your problem description/question? Thanks
Hi @Sapna1. it is still hard to follow what your exact problem is. Anyhow, I will try to give you a rough outline of how you can achieve that.
- Each row in your HTML table or list should have a unique id (e.g. <div id=“record-12345”></div>)
- Your “Remove” button should have a common CSS class (e.g. <a class=“remove-button” …>Remove</a>)
- Add custom javascript to listen for a click on “Remove” buttons (e.g. jQuery(‘.remove-button’).on(‘click’, function() { [add your code here] }) )
- In the event handler:
- Find the parent div containing the record id
- Optionally, make an AJAX call to remove the record on the server side
- Remove the DOM element with .remove()
I hope this helps you in some way.
