Skip Navigation

[Resolved] create many msg with form for each user

This support ticket is created 2 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 3 voices.

Last updated by fabioF-5 2 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#2271607

Hello I'm trying to create a membership site and have problem to set structure of site.
Could you help me in setup the site?
here Step I used to set up
Create custom type USER and custom field group ( address, car, phone, mobile brand etc,etc)
Create custom type MSG and relative custom field group ( name, mail, msg)
Create form CONTACT insert new item in msg ( nome, mail, msg)
in Frontend create view to show all user and click on some user I go in user page.
In user page How I create many msg for same user?

In user forntend logged in I'm trying to show total msg received but I don't know how connect user to msg
Thank you for any help
Best regards

#2272187

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You shared that you created the post types but to relate the post types have you created any post relationship?

Have you created post type relationship between users post type and msg post type?
- https://toolset.com/course-lesson/what-are-post-relationships-and-how-they-work/
- https://toolset.com/course-lesson/how-to-set-up-post-relationships-in-wordpress/

Once you setup the post relationship, on contact page where you added the form please make sure that the parent field Users to connect the msg you submit with form should be available.
- https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/

Once that is done, you can create a view to display the related msg belongs to specific user:
- https://toolset.com/course-lesson/displaying-related-posts/#displaying-many-related-items

#2272309

Hello
thanks for your reply,
I'm little confused about what you explain,
I just create relationship between Custom post type Member and CPT Message, in one to many relationship where Members are parent and message are child.
is this ok? I thought one member (parent) can have many messages (child), could you confirm?
then in home page i show member and click on some of them I show memebr page where I have to use form to send msg to that specific member from any guest.
I'm near but I don't know why it doesn't work and other thing, how I can send the msg on members mail with toolset? is there some function to do that or use only notification?
Thanks again

#2274331

Someone can help me to close this task?

#2274367

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Fabio,

As Minesh is currently on vacation, I will be handling this issue for him.

is this ok? I thought one member (parent) can have many messages (child), could you confirm?

That is correct in a One to many relationship where Member is the Parent and Messages is the Child, Members can have many Messages but Messages can only be link to one member.

then in home page i show member and click on some of them I show member page where I have to use form to send msg to that specific member from any guest.

Essentially what you want here is to send a message to a member when you've viewed their profile correct? Is it a case where the person sending the message will be a guest?

I'm near but I don't know why it doesn't work and other thing, how I can send the msg on members mail with toolset? is there some function to do that or use only notification?

Does the member have an email field on their profile page ?

We should be able to achieve this if the member has an email so we can create a hidden field and send the message to that email.

Please let me know.
Thanks,
Shane

#2274533

Hi Shane, thank you for your reply,
To answer your question, is yes, the Sender is a guest, and member has mail in a custom field.
How I can set the field like an hidden field to send mail to?

In member area I set the messages with view, but I don't know how to show date and time of any messages.
Can you help me to solve this problem?
Many regards

#2275551

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Fabio,

The post date can be displayed using this shortcode below.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-date

When you're displaying the message the above shortcode can be used to show when the post was created.

How I can set the field like an hidden field to send mail to?

What you can do is to use the expert editing mode for the form and then use css to hide the field for e.g

<div class="hidden">
email field here
</div>

Then hide it with the css below.

.hidden{
display: none;
}

Please let me know if this helps.
Thanks,
Shane

#2279077

My issue is resolved now. Thank you!