I am using toolset to create a database with custom entries.
I need to allow a specific user of a specific role to access X amount of custom posts of the type listings.
For example, we have a user with a limit of 60 listings. He can see the title and some fields of all the listings. He can then "check out" the listing. The checked out listing will allow him to view other fields meant only for users who checked the listing out. After checking out the listing he has 59 listings available.
My Thoughts are to create a hidden field inside the listing called User ID's. Then the user clicks a button, which adds their User ID to the hidden field of the listing.
Then I would add another Listings Remaining field to the User. The same button would decrease the listings remaining by one
Hello. Thank you for contacting the Toolset support.
Well - if you want to set specific limit count for particular role with particular user - what if you create a user custom field that will hold the limit count value - lets say 60.
And then whenever user create/checkout listing - you should decrease the user field value by 1 each time and update the custom user field value. Does this makes sense?
Well - you should try create CRED form and add only submit button and use CRED hook cred_save_data so when it clicked you should add the code withing the cred_save_data hook to update the total user counts.
adds the user ID to the posts user ID fields:
==> For this - you should create a repeating numeric field to hold the user IDs.