Forum Replies Created
Yeah, sorry I meant to jump in here and post this in case anyone is interested…
This does require code modification but, if you really need it, it’s fairly simple. Ideally, these options would be abstracted and there would be a filter but considering this is sort of a bonus feature in this plugin, it’s not really necessary. In my example, the actual taxonomy could be abstracted (Kind of like the custom field option) but, since I only needed one custom taxonomy, I just hard coded it.
Note – This is for 2.1.7 but I’m sure the same applies to 2.1.8
To add custom taxonomies to the notification email, you just need to add a few lines to class/frontend-form-post.php
In the prepare_mail_body function there is an array of options (assigned to $post_field_replace) with variables you should recognize from the notification page in the form builder (ex: %post_title%’, ‘%post_content%’, etc..).
These variables correspond to the values set in the array below ($post_field_replace). It should be pretty clear how this works by looking at the code.
So, all you really need to do is add ‘%taxonomy%’ to the $post_field_replace array and add $this->pending_post_count( ‘mycustomtaxonomy’ ) to the corresponding place in the $post_field_replace array.
In the end it should look like this…
Obviously, this will work for other things as well as taxonomy too.
It should work with a comma followed by a space. I send the confirmation emails to about 10 different addresses this way. You may want to copy and paste it in to your regular email client and send, just to make sure there’s not a typo somewhere.
As for the edit_post link, you may have the ‘Override the post edit link’ option set to ‘Yes’ in settings. Try setting that to ‘No’ and see if you are redirected to the back-end from the email.
Ok, I’m back and that worked perfectly. I took it a step farther and added a character count in the help text by adding a line to the example jQuery. Now, in addition to the character limit, user see how many characters they have left. feel free to add this to the example doc as it is already very useful.
Perfect. I’m going to try this out; I’ll report back with results. Thanks.
Thanks Tareq. I’ll read up on that.
Haha, that’s so obvious. That would work. Thanks.
Thanks for the quick response! I spoke too soon, there was actually a setting I had to change to get it working. We’ve read through a lot of the 404 documentation but liked this plugin because it automatically catches and logs 404s and sets up a redirect to the post the user was most likely trying to access. All is well.