Hello, thanks for all the great previous help.
My site is sort of a directory with listings post types (i.e. restaurants ).
I would like each listing to have a subscription form (sort of a facebook Join button),
in which the user will add his details and click submit,
and the listing owner will get a list with all the subscribed users and their details.
I saw one solution in the forum, using a post type for each subscriber.
Though I might have a lot of subscribers and my DB will be full of posts.
Do you have any creative solution for that?
I thought of mybe creating one Subscribers post type for each listing post type, which will contain a single line multiple field or mail , and the form will add another one each time, while hiding the Subscribers list from the user, but I'm not sure how to do that. Any other solution will be accepted 🙂
Thanks
Dear shirly,
I suggest you create a custom post type "subscription", and setup it as child post type of "listings", and add custom fields for subscribed users details, then use CRED form for creating child post to setup the form, see our document:
CRED Forms for Child Content
https://toolset.com/documentation/user-guides/cred-forms-for-child-content/
and display child "subscription" posts in a parent "listings" post:
Querying and Displaying Child Posts
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/
Did you mean , that the custom field will be repeated, and the subscribers will enter their details in each line?
If so, wouldn't the previous subscribers will be displayed in the cred form?
I don't want everyone to see who is subscribed.
Is there a way to hide the subscribers, and show just the single line input and a subscribe button in the cred form?
Q1) that the custom field will be repeated, and the subscribers will enter their details in each line?
Yes, those custom fields are repeated, see our document:
Creating Groups of Repeating Fields
https://toolset.com/documentation/user-guides/creating-groups-of-repeating-fields-using-fields-tables/
But it is not repeated in CRED form, according to W3C standard, form within form is not allowed.
Please check our document:
CRED Forms for Child Content
https://toolset.com/documentation/user-guides/cred-forms-for-child-content/
You will need to setup a link to the CRED form for creating child post
Q2) Is there a way to hide the subscribers, and show just the single line input and a subscribe button in the cred form?
Since it is different CRED form, the new subscribers should not be able to see the previous subscribers.