Hiding button in a DA repeating region
I'm using DA to populate a repeating region with a logged in clients photos.
User photo data is sourced from mysql table 'PhotoImgLib'
A button is rendered in each region displaying a photo.
When the button is clicked, the id of the selected photo and logged in user is updated in a different mysql table called PhotoImgUpd.
Each record in the table PhotoImgUpd is user-unique (one entry per user), so the photo id will only update the user record if found, no matter which photo is selected.
This all works fine.
Heres the what im trying to achieve;
If a user has say 12 photos, which are all displayed using the repeat region and selects photo 6, then the id:6 (assuming its the index # in the PhotoImgLib table) will be updated in the PhotoImgUpd table.
After an update and when the page refreshes the repeat region, I would like the button for photo id:6 (or whichever record was selected) to hide or change the button text to "Photo already selected" - something to indicate to the user that the selected image has already been updated.
The other 11 photos will have the button enabled so they can be selected by the user.
Any ideas please?
Thank you.