Title: using function to echo an paragraph.
Last modified: August 30, 2016

---

# using function to echo an paragraph.

 *  Resolved [otaviof](https://wordpress.org/support/users/otaviof/)
 * (@otaviof)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/using-function-to-echo-an-paragraph/)
 * not sure if that’s been answered so I apologize in advance for any redundancy.
 * I want to display some html when certain value is achieved/
 * I was able to do a calculated field with a function like this:
 * (function(){
    if(fieldname9 > 10) return ‘Congratualtions!’ })();
 * But this only echoes inside the field. I would like to echo a lot more text than
   within a single-line field. Maybe a whole <div> Is it possible to achieve that
   out-of-the-box?
 * [https://wordpress.org/plugins/calculated-fields-form/](https://wordpress.org/plugins/calculated-fields-form/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/using-function-to-echo-an-paragraph/#post-6564453)
 * Hi,
 * Yes of course, that’s possible, but you need to use some tricks. I’ll try to 
   explain the process with an example:
 * 1. Inserts a “HTML Content” field in the form, and enters in the attribute: HTML
   content, the tags: <div id=”myfield”></field>
 * 2. Finally, modifies the equation associated to the calculated field as follows:
 *     ```
       (function(){
       if(fieldname9 > 10) jQuery('#myfield').html( '<strong>Congratulations!</strong>' );
       })()
       ```
   
 * Now, you simply should use the tags you prefer to display in the “myfield” field.
 * and that’s all.

Viewing 1 replies (of 1 total)

The topic ‘using function to echo an paragraph.’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/using-function-to-echo-an-paragraph/#post-6564453)
 * Status: resolved