Skip Navigation

[Resolved] Send message to post author

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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Waqar 1 year ago.

Assisted by: Waqar.

Author
Posts
#2593057

I have the problem that the messages are not sent to the post author. I found this thread about it https://toolset.com/forums/topic/sending-message-to-post-author/. I think I just need to make these changes "needed to add [wpv-post-author format='meta' meta='ID'] in the "new message form"".
But I don't know where in the form this code snippet needs to be. But I don't know where in the form this code snippet needs to be. Here is the current form content:

[credform]
<div class="form-group">
<label for="%%FORM_ID%%_titel">[cred_i18n name='titel-label']Betreff[/cred_i18n]</label>
[cred_field field='titel' force_type='field' class='form-control' output='bootstrap']
</div>
<div class="form-group">
<label for="%%FORM_ID%%_nachricht">[cred_i18n name='nachricht-label']Nachricht[/cred_i18n]</label>
[cred_field field='nachricht' force_type='field' class='form-control' output='bootstrap']
</div>
[cred_generic_field type='hidden' field='wpcf-message-from']
{
"default":"[wpv-current-user info='id']",
"generic_type":"user_id",
"persist":1
}
[/cred_generic_field]
[cred_generic_field type='hidden' field='wpcf-message-to']
{
"default":"[get_author_id_in_archive]",
"generic_type":"user_id",
"persist":1
}
[/cred_generic_field]
[cred_field field='form_submit' output='bootstrap' value='Send message' class='btn btn-primary btn-lg']
[/credform]

#2593559

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot this, I'll need to see how this form and its email notification are set up in the admin area.

Can you please share the temporary admin login details, along with the link to the page with this form?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2595949

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for waiting as we had a busy forum queue over the weekend.

In the form 'New message', there are two hidden generic fields. The second one is with the slug 'wpcf-message-to', which is currently using the shortcode '[get_author_id_in_archive]' as the value.
( screenshot: hidden link )

In that field's value, you can replace [get_author_id_in_archive] with the shortcode [wpv-post-author format='meta' meta='ID'], so that it populates the ID of the post author of the page/post where this form is used.

I hope this helps and let me know how it goes.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.