Title: Calculated field does not display HTML code
Last modified: July 26, 2024

---

# Calculated field does not display HTML code

 *  Resolved [Radovan](https://wordpress.org/support/users/radovand/)
 * (@radovand)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/calculated-field-does-not-display-html-code/)
 * Hi,
   I am having trouble displaying the HTML code through a field of type “Calculated
   Field”.
 * Example:
   fieldname1 (type Calculated Field) contains the HTML code:
 *     ```wp-block-code
       <h4>Main Features</h4><ul><li>Includes a form builder for adding/editing different field types, including one or more automatically calculated fields based on data entered in other fields.</li><li>The submitted information can be sent by email to one or more email addresses and an auto-reply to the user who filled the form.</li><li>The form can be prefilled from external data-sources</li><li>It is possible to connect the form to a PayPal payment, either for one-time payments or for recurrent/subscription payments.</li></ul>
       ```
   
 * fieldname2 (type Calculated Field) contains the function:
 * 
   (function(){return fieldname1;})()
 * Instead of displaying the contents of fieldname1 (HTML code), the value “3” is
   displayed.

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/calculated-field-does-not-display-html-code/#post-17914855)
 * Hello [@radovand](https://wordpress.org/support/users/radovand/)
 * Thank you very much for using our plugin.
 * The plugin preprocesses the fields’ values in the equations to use with mathematical
   operations. However, the plugin includes modifiers.
 * What are the modifiers? The modifiers are symbols you add to the fields’ names
   in the equations to tell the plugin how to handle the fields’ values and modify
   the default plugin behavior.
 * A modifier is |r. The |r tells the plugin you want to use the field’s raw value
   instead of the preprocessed one.
 * So, the second equation could be:
 *     ```wp-block-code
       (function(){return fieldname1|r;})()
       ```
   
 * Other modifiers are |n, and |v. They are not necessary in your current project
   but I will describe them in case you need these modifiers in the future.
 * The plugin replaces the fields’ names with their values before evaluating the
   equations. The |n modifier tells the plugin you are referring to directly to 
   the field’s name instead of its value.
 * Eg.
 *     ```wp-block-code
       (function(){getField(fieldname123|n).setVal(fieldname1|r);return fieldname1|r;})()
       ```
   
 * The |v modifier only applies to radio buttons, checkboxes, and dropdown fields.
   These controls contain choices, and each choice has a text and value. The plugin
   uses the values of the user-selected choices from the equations. The |v modifier
   allows you to access the value of the information these fields will submit.
 * For example, if you have the radio buttons field fieldname123, and you configured
   it to submit the choice text, and you use fieldname123 in the equation. You would
   be using the value of the choice ticked by the user. But if you use the |v modifier,
   fieldname123|v you would use, in this case, the choice text.
 * Best regards.
 *  Thread Starter [Radovan](https://wordpress.org/support/users/radovand/)
 * (@radovand)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/calculated-field-does-not-display-html-code/#post-17915014)
 * It works. 
   Thank you.

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

The topic ‘Calculated field does not display HTML code’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Radovan](https://wordpress.org/support/users/radovand/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/calculated-field-does-not-display-html-code/#post-17915014)
 * Status: resolved