Skip Navigation

[Resolved] Using toolset for contact form functionality

This support ticket is created 5 years, 5 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Author
Posts
#1263705

Hi, I read this https://toolset.com/forums/topic/create-contact-form-per-custom-post-type/ and I tried something like it,

The issue is Toolset Access, it wont allow a guest to fill out a form to the post type for messages, so at the moment, anyone wanting to contact us, has to create a user.

Is there any way around this? I'm trying to both avoid having an extra form plugin and also make it so that my psycologists can access messages sent to them, from their front-end admin.

Thanks 🙂
Lykke

#1263997

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-06-10 at 12.29.54.png

Once Access is active, guests cannot see Forms—unless you specifically grant them the ability to.

Go to Toolset > Access Control > Toolset Forms and allow Guest users the ability to use the relevant form.

#1269749

Hi Nigel,

Thank you very much, obviously it's the form I needed to set permissions for, I was trying with the post type.

I need to have the recipient of the message sent along somehow, so that
1. they can view messages written to them specifically (in a frontend administration)
2. so they receive notification emails.

I'd prefer not having to create 14 different forms, one for each psycologist.
The form will be placed on their "profile" page, the pages are in a post relationship with the post type "psycologists"
Each of them has one "psycologist" post and they are the author of it.

I was thinking of exchanging those 'page' profiles with a content template from the 'psycologist' post type, but I would have to streamline the content and design of their profiles, and it's not optimal.

I see there's a way to add a user ID to the form when posted, can I use this? (And if so, how does it work?)

What would you suggest?

Best regards
Lykke

#1270355

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Where are you displaying the contact form?

I envisage a contact form would work something like this:

- you have a "message" custom post type
- you have a form to "publish" messages
- the form includes an email field (e.g. "recipient") of who is being contacted
- if you display this form on psychologist profile page and that has a contact email address, then you can set the value of the recipient email address automatically with the psychologist contact email address
- the notification is set to be sent to the value of the recipient field

That handles sending the email to the psychologist.

You can then create a View of message posts which filters them by recipient email, so that a psychologist can see their messages (you would pass their contact email address to the View to provide the recipient filter value using a shortcode attribute, as described here: https://toolset.com/documentation/user-guides/passing-arguments-to-views/)

Does that work for you? If you need more info about some specific detail, let me know.

Also, this was developed for registered users communicating with each other, but you may find reading through this helpful: https://toolset.com/2018/11/introducing-toolsets-communication-system-for-professional-listing-sites/

#1270385

It sound like it could work, I was thinking that I needed to pass some ID from users and psycologists, but it makes sense using their email address to identify recipients also for the view.
I will try setting it up and get back to you asap if I have anything else for this thread.

The messaging system looks so interesting and I can't wait to have the chance to use it. The clients create an account, so in theory they could get the feature, but, the psycologists would have to check messages from two places. It could get confusing if the clients would shift between methods of contact as well. I'm actually a little down about it, it would have been so awesome .

#1270745

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, let me mark this as awaiting your feedback so it's not in my queue. Let me know how you get on.