I am trying to fix some CRED notifications that stopped working - and I was sent to the following page for instructions on how to do the notifications:
https://toolset.com/documentation/user-guides/automated-email-notifications-with-cred/?utm_source=formsplugin&utm_campaign=forms&utm_medium=forms-gui&utm_term=email-notifications
On this page, it says to use the Fields and Views icon OR the Insert Subject/Body Codes icon to to put info into the Body of the notification email.
However, I do not see the Insert Subject/Body Codes icon - I see instead the "Placeholders" icon. When I use that icon, it gives me the output of "%%FORM_DATA%%" as my only option - and there is no way to "style" that output.
Is there a way to individually access generic fields that are created in the form as part of the notification output?
Thanks.
Elise
NMI
Dear Elise,
The "Subject" is same as post title, you can use placehoder "%%POST_TITLE%%", it is the same result as Views shortcode [wpv-post-title].
"Body" placehoder has been removed, you can use Views shortcode [wpv-post-body] in the email content to display the post content.
More help:
hidden link
I don't think you are quite following what I was saying.
I'm not using the body of the post - I am creating a generic field on the fly that is called "Body" so that the user can input it on the fly.
When I try to insert fields, or insert placeholders - the generic fields I've created are not offered as possibilities.
Here is the code for my form:
[credform class="cred-form cred-keep-original"]
<br>
<table>
<tr><td><i>Please enter your email message below, and it will be delivered to the Talent Bank member named above. You will also receive a copy of your email.</i>
</td></tr></table>
<br>Reply Email: [cred_generic_field field="ReplyEmail" type="email" class="" urlparam=""]
{
"required":1,
"validate_format":1,
"persist":1,
"default":"EnterYourEmail@domain.com"
}
[/cred_generic_field]
<br>Message: [cred_generic_field field="Body" type="textarea" class="" urlparam=""]
{
"required":1,
"validate_format":0,
"persist":1,
"default":"Enter your email message here."
}
[/cred_generic_field]
[cred_field field="form_submit" value="SEND EMAIL" urlparam=""]
[/credform]
In the notification (after form is submitted) - I can put %%FORM_DATA%% and it shows the value of both ReplyEmail and Body - but it does it with no styling at all. It looks like this:
========================
ReplyEmail janemusicaltheatre@gmail.com
Body Hello Jordan, I got a referral from Elise to contact you. I am working on the Core curriculum and need a tenor. I know it’s a bit short notice, but Elise highly recommends you. I will need to get something done before Saturday. It can be done remotely. Would you be interested and available?
======
Although it is in a chart form in the notification email.
I would like to STYLE the way it looks in the notification email, so I would like to call the value of each generic field one by one - but I can't find a way to do that.
Is that more clear?
Thanks.
Elise
Thanks for the details, there isn't such a built-in feature to style the %%FORM_DATA%% output, it is designed for developer, I suggest you setup the email body content manually, style each field with your custom html codes, for example:
<div class"my-style-1">
field 1 here ...
</div>
<div class"my-style-2">
field 2 here ...
</div>
...
I'm not sure I understand how to use the div styles you are suggested ... wish I did - but it's a little beyond me.
If I were trying to style regular fields (rather than generic ones) I would just call the fields clicking the "Fields and Views" button on the notification window - but the generic fields aren't listed there. The only ther button I can click is "Placeholders" - and it doesn't offer the generic fields either.
I'm attaching some screen shots to show what I mean.
Screenshot1 shows my notification dialogue box - with the two buttons for "Fields and Views" and "Placeholders"
Screenshot2 shows what you get if you click "Fields and Views"
Screenshot3 shows what you get if you click "Placeholders"
What is missing for me is where to find the generic fields that I have created in my form ("ReplyEmail" and "Body").
Is there no way for me to access them individually - like I can with all other fields - instead of just through the Placeholder %%FORM_DATA%%?
If I could access them separately, I could "style" the notification the way I want.
Right now, the %%FORM_DATA%% placeholder makes the output look like Screenshot4
I would like to make it look like this:
YOUR MESSAGE: Hi, Kelly, I got a referral from Elise to contact you. I am working on the Core curriculum and need a mezzo. I know it’s a bit short notice, but I will need to get something done before Saturday. It can be done remotely. Please let me know if you would be interested.
PLEASE REPLY TO THIS EMAIL ADDRESS: janemusicaltheatre@gmail.com
Elise
How do you setup the Toolset form? Is it a post form or user form?
If it is a post form, in the email content, you can get the custom post field "ReplyEmai" value with Views shortcode:
[wpv-post-field name="ReplyEmai"]
Then display it in the email content, like this
For example:
<div class="ReplyEmai">
[wpv-post-field name="ReplyEmai"]
</div>
More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field
Output a custom field for the current post.
If it is a user form, you can follow our document to setup the custom user field shortcode:
https://toolset.com/documentation/user-guides/cred-user-forms-email-notifications/#inserting-the-user-login-information-fields
For your reference.
Yes - thank you - that was it!
I knew it wouldn't be [types field="ReplyEmail"][/types] - but I didn't know it would be as easy as [wpv-post-field name="ReplyEmail"] - thanks so much!
Elise
My issue is resolved now. Thank you!