Skip Navigation

[Resolved] How can I add content of generic fields of post forms to notification mail?

This support ticket is created 4 years, 1 month 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)

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by andyB-12 4 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1869249

Hey there, I created three different post forms that are working fine.

I also added a notification for each of the post forms that should send all the content of the fields to the mail of the admin of the site. This works well for the custom fields that I created for the post type and these are added via this code "%%FORM_DATA%%", but the generic fields (two single line text fields) are not added to the mail. I tried to add them with %%slug%% but this did not work. Could you help me?

Screenshot of the post form fields:
hidden link

Screenshot of the notification mail:
hidden link

#1869427

Shane
Supporter

Languages: English (English )

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

Hi Andy,

Thank you for getting in touch.

Can you try this.
[wpv-post-field name='field slug goes here' item='%%POST_ID%%']

Can you replace "Field Slug goes here" with the actual slug and let me know if it works.
Thanks,
Shane

#1869439

Hi Shane,

unfortunately it did not work:
Mail: hidden link

Code: hidden link

#1870445

Shane
Supporter

Languages: English (English )

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

Hi Andy,

The generic fields, are you using them to store data for later use ? Meaning that you want the data from these fields ?

Why not create these fields as actual custom fields ant then we try adding those fields to the email ?

The generic fields are possible but I believe they must be set to store on the backend for it to work.

Please let me know.
Thanks,
Shane

#1870869

Hi Shane, the generic fields are only for information the admin of the site needs. We are using the post forms to enable visitors to send in new posts and the generic fields are for their contact information, so the admin can contact them, if something is unclear. That means the content of the generic fields is only needed in the mail notification and nowhere else.

#1870885

Shane
Supporter

Languages: English (English )

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

Hi Andy,

Ok, In this case you will need to set the fields to store the data.

This can only be done in the expert mode of the editor. SO modify your generic field code to include.

"persist":1,

Then try using this again [wpv-post-field name='field slug goes here' item='%%POST_ID%%']

If that doesn't work please provide me with admin access to the site as well as a link to the form on the frontend so that I can have a look.

Thanks,
Shane

#1878341

My issue is resolved now. Thank you!