How to delete a Item

Hello I have an app where users can upload their items and they have to set a field call code to post it, this is like a unique custom code given by the user so I’d like users to delete the item by writting the same unique custom code that he provided
For example when they click in the trash icon, the trash icon opens like a input or page where user place the code and the item deletes