Title: Customizing e-mails
Last modified: August 30, 2016

---

# Customizing e-mails

 *  Resolved [Simba](https://wordpress.org/support/users/simbalion/)
 * (@simbalion)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/)
 * Hi, I understand I can customize an email by adding specific field names, but
   I was wondering if I could customize the output of checkbox fields? Instead of
   listing each checked option inline, I’d like them to be on seperate lines. Is
   that possible? I am guessing it might require editing the plugin code..
 * [https://wordpress.org/plugins/calculated-fields-form/](https://wordpress.org/plugins/calculated-fields-form/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582277)
 * Hi,
 * Yes, you are in the right direction, in this case is needed customize the plugin’s
   code.
 * Please, follows the steps below:
 * 1. Open the “/wp-content/plugins/calculated-fields-form/cp_calculatedfieldsf.
   php” file with the text editor your choice.
 * 2. Go to the snippet of code:
 * `$value = ( !empty( $value ) || is_numeric( $value ) && $value == 0 ) ? ( ( is_array(
   $value ) ) ? implode( ", ", $value ) : $value ) : '';`
 * and modify it as follows:
 * `$value = ( !empty( $value ) || is_numeric( $value ) && $value == 0 ) ? ( ( is_array(
   $value ) ) ? implode( "<br>", $value ) : $value ) : '';`
 * 3. Finally, insert the field in the email, and select the “HTML” option as the
   format of the email, in form’s settings.
 * and that’s all.
    Best regards.
 *  Thread Starter [Simba](https://wordpress.org/support/users/simbalion/)
 * (@simbalion)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582283)
 * I’ve done as you recommend, but it does not seem to have had the desired effect..
   I don’t have a caching plugin installed, and I’m uncertain why it’s not working..
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582307)
 * Hi,
 * I will need to check the form’s settings, and the modified code. Please, create
   a ticket in my private support page with the access to your WordPress:
 * [http://wordpress.dwbooster.com/support](http://wordpress.dwbooster.com/support)
 * Best regards.
 *  Thread Starter [Simba](https://wordpress.org/support/users/simbalion/)
 * (@simbalion)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582326)
 * I still get a bounce message in my email when I use your website’s ticket form.
 * The line I edited is 1332, and this is what I changed it to:
 * `$value = ( !empty( $value ) || is_numeric( $value ) && $value == 0 ) ? ( ( is_array(
   $value ) ) ? implode( "<br>", $value ) : $value ) : '';`
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582373)
 * Hi,
 * Please, remember, that in this case, where has been modified the plugin’s code,
   you should replace the special tag ‘<%INFO%>’ in the notification emails, by 
   the tags of the fields directly.
 * If the issue persists, please, create a ticket in my private support page with
   the access to your WordPress:
 * [http://wordpress.dwbooster.com/support](http://wordpress.dwbooster.com/support)
 * Best regards.
 *  Thread Starter [Simba](https://wordpress.org/support/users/simbalion/)
 * (@simbalion)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582406)
 * I see, is there a way to make the changes work for `<%INFO%>`? Actually what 
   I’d like to do is make the change work for the ‘summary’ field in the form, I
   am guessing Summary uses the same function as `<%INFO%>`..?
 * I realized the summary field does what I wanted in another post, but it still
   displays checkbox fields as Value, Value, Value, when what I want is:
    Value 
   Value Value
 * So I can copy and paste to e-mails. I would like to have each value on it’s own
   line in both summaries, and emails sent at submission.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582413)
 * Hi,
 * In this case you will need to replace the snippet of code:
 * `$buffer .= $fields[str_replace($_POST["cp_calculatedfieldsf_pform_psequence"],'',
   $item)]->title . ": ". (is_array($value)?(implode(", ",$value)):($value)) . "\
   n\n";`
 * with
 * `$buffer .= $fields[str_replace($_POST["cp_calculatedfieldsf_pform_psequence"],'',
   $item)]->title . ": ". (is_array($value)?(implode("\n",$value)):($value)) . "\
   n\n";`
 * Best regards.
 *  Thread Starter [Simba](https://wordpress.org/support/users/simbalion/)
 * (@simbalion)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582418)
 * That worked for emails, but it looks as tho summaries are handled elsewhere, 
   can I change that also?
 *  Thread Starter [Simba](https://wordpress.org/support/users/simbalion/)
 * (@simbalion)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582422)
 * Also, if you could tell me how to add a `<br>` or `\n` to the end of the field
   label when using `<%fieldname# if_not_empty%>` that would be excellent 🙂
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582424)
 * Hi,
 * It is really hard customize the plugin’s code remotely, without access to it.
 * Ok, in addition to the previous modifications, go to the snippet of code:
 * `if( is_array( $result->paypal_post[ $field ] ) ) $result->paypal_post[ $field]
   = implode( ',', $result->paypal_post[ $field ] );`
 * and replace it with the following one:
 * `if( is_array( $result->paypal_post[ $field ] ) ) $result->paypal_post[ $field]
   = implode( '<br>', $result->paypal_post[ $field ] );`
 * Best regards.
 *  Thread Starter [Simba](https://wordpress.org/support/users/simbalion/)
 * (@simbalion)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582428)
 * Okay, so with the changes on Line 479 and line 997 it is formating <%INFO> properly
   the way I wanted..
 * That is probably the best.. I’d like to be able to precisely format the letter
   using <%fieldname#%>, but I dont know if that’s possible.. If I change line 1332
   it adds a 
    after each item in the value array, but not the last item (because
   it doesn’t have a separator?), so the label for the next field is right next 
   to it.. If I add a  into the letter manually, then when a field isn’t shown because
   it’s empty it ends up displaying extra blank lines in the email.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582434)
 * Hi,
 * Please, pay attention to the plugin’s documentation:
 * [http://wordpress.dwbooster.com/faq/calculated-fields-form#q81](http://wordpress.dwbooster.com/faq/calculated-fields-form#q81)
 * The tag can be inserted with the following attributes:
 * `<%fieldname3 if_not_empty after={{<br>}}%>`
 * In whose case the field with name: fieldname3 will be inserted in the email or
   thank you page only if it is not empty, and if it is inserted, the plugin will
   insert at the end, the tag `<br>`, that correspond to a change of line.
 * Best regards.
 *  Thread Starter [Simba](https://wordpress.org/support/users/simbalion/)
 * (@simbalion)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582448)
 * Awesome! Thank you! 🙂 I read through the docs twice! but somehow I overlooked
   that.. I was probably lacking sleep 😉

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Customizing e-mails’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form - AI Form Builder for WordPress - Contact, Payment, Quote, Quiz & More](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [Simba](https://wordpress.org/support/users/simbalion/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/customizing-e-mails/#post-6582448)
 * Status: resolved