I have a "donationamount" field in the interface. I want to put a condition that one person can make only 3-5 donations per year only , and also calculate and display how many donations are left for that person.
Any suggestion on how to execute the above scenario?
Discussion posts and replies are publicly visible
Assuming you store each donation in database, I would just load all donations for the logged in user. Then show them in a list. Can be a grid or just some card layouts.
Then make the "donate field" show only if the user is allowed to do another one.
Stefan is completly right here. So you would need a field in your donation cdt to store the user and than search your desired donations via user. -> Perhaps the totalcount is already sufficient for you as you are just looking for numbers.
Thank you @Stefan Helzle