Home › Toolset Professional Support › [Resolved] Sending Messages From One User To Another
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 |
---|---|---|---|---|---|---|
- | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | - |
- | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
Tagged: Toolset Forms
This topic contains 12 replies, has 2 voices.
Last updated by Noman 6 years, 2 months ago.
Assisted by: Noman.
My site has two User Roles (Ship Owner and Reseller) and a system that allows Ship Owners to be able to specify which Resellers can see their posts.
What I need is for a way to allow a Reseller to send a message or email to one or more Ship Owners to ask for the above permissions to be granted. All this has to be is a message, it does not need to connect with the above process.
What would you suggest the best approach is here? If not a messaging system, could it be a CRED form with a dynamically generated list of Ship Owners that are then emailed on form save if selected? Or is there a better way?
Any advice would be most appreciated!
Getting a dynamically generated list of Ship Owners is no problem (See https://toolset.com/forums/topic/dynamic-checkboxes-field-to-associate-users-with-custom-posts-created-in-cred/ for reference).
Hi Jon,
Thank you for contacting Toolset support. I do not recommend using CRED plugin for messaging system. I suggest to use a plugin that is purely made for messaging between users. You can find various in wordpress.org OR codecanyon.net like below:
https://wordpress.org/plugins/front-end-pm/
- Tutorial on same plugin: hidden link
More plugins here:
- hidden link
- https://wordpress.org/plugins/search/messages/
Thank you
Okay, I'll take a look at these.
The Email option may be best for us though. If I have a dynamically generated list of Users presented as checkbox options, how would I set it up such that those users would be emailed on form submission?
I ask as in the Email Notification options in CRED it has an option for "Send notification to a WordPress user specified in a form field:"
That option is to give a username statically in the form notifications. But it can't be dynamically added because the CRED form interface does not have a way to list all users in a select option. That's where is the limit in this case.
So the options in notification is good only if you would add the users manually and directly into the form notification settings.
Thanks
To clarify, I am able to dynamically generate a list of users as select options - I'm already doing this (see https://toolset.com/forums/topic/dynamic-checkboxes-field-to-associate-users-with-custom-posts-created-in-cred/).
Are you saying the results of this could not be used to populate "Send notification to a WordPress user specified in a form field"?
Hello Jon,
You need to add "generic_type" : "user_id" in generic field. For more details:
https://toolset.com/documentation/user-guides/automated-email-notifications-with-cred/#attachment_382411
Your shortcode should look like:
[cred_generic_field field="my-generic-field" type='select' class='' urlparam=''] { "generic_type" : "user_id", "required":1, "validate_format":0, "persist" : 1, "default":[], "options":[ [wpv-view name="my-user-view"] ] } [/cred_generic_field]
Then you can select above generic field from “Send notification to a WordPress user specified in a form field” option from notification as in screenshot.
It’s working at my end. Please let me know if you found any issue.
Thank you
I have set up as you suggested but the notification email is still only going to the logged in user (the one sending the form).
The code I'm using is below - I also tried changing the checkboxes field to a select field but this did not solve it.
[hide-it][wpv-layout-start][/hide-it] [wpv-items-found] <!-- wpv-loop-start --> <wpv-loop>[wpv-item index=1]{"value":"[wpv-user field="ID"]","label":"[wpv-user field="display_name"]"} [wpv-item index=other],{"value":"[wpv-user field="ID"]","label":"[wpv-user field="display_name"]"} </wpv-loop> <!-- wpv-loop-end --> [/wpv-items-found] [hide-it][wpv-layout-end][/hide-it]
[cred_generic_field field='reseller-access-request' type='select' class='' urlparam=''] { "generic_type" : "user_id", "required":0, "validate_format":0, "persist" : 1, "default":[], "options":[ [wpv-view name="ship-owners-dynamically-generated-for-cred"] ] } [/cred_generic_field]
Okay, please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and check the issue.
Your next answer will be private which means only you and I have access to it.
=== Please backup your database and website ===
✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.
✙ Please add the Links to the [CRED Form] Edit Screen and [Page] Edit Screen where you have inserted this Form.
Thank you
Quick Question here, did you create the user test_logged_in_user ? Just checking so I know who's doing it!
Yes, I have created this test user. I am still working on this issue.
Thank you for your patience.
Hello,
I am able to reproduce this issue with CRED Edit User Form. I have now escalated this issue to our 2nd tier support for further review and we will get back to you with an update.
Thank you for your co-operation and patience as we strive hard to resolve this.
Hi,
Just wanted to send an update that we have a workaround, you can check here:
https://toolset.com/errata/notifications-not-sent-when-using-generic-select-field-with-generic_type-attribute-of-user_id/
Thanks
Posting an update here that this issue will be fixed in Toolset Forms 2.1.2