delete perticular document in firestore
function delete_firebase(id) {
console.log('delete: ' + id);
var user_select = confirm('Are you sure you want to delete this post?');
if (user_select == true) {
var db = firebase.firestore();
db.collection("form").doc(id).delete().then(() => {
alert('Post Deleted Successfully!');
console.log("Document successfully deleted!");
}).catch((error) => {
console.error("Error removing document: ", error);
});
}
}