Title: Shortcode to create default field value
Last modified: December 7, 2022

---

# Shortcode to create default field value

 *  [samganti](https://wordpress.org/support/users/samganti/)
 * (@samganti)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/shortcode-to-create-default-field-value/)
 * Hi,
    Great plugin, this helps me a lot for what I need to accomplish. Just one
   question: Is there a possibility to use a shortcode in one of the form fields
   or to use it as part of the price calculation in the background? I’m developing
   a webshop for jewellery, and the current gold price needs to be added to the 
   price calculation upon ordering the items. I can currently get the gold price
   through a shortcode but so far have not been able to figure out how I can make
   it part of the calculation.
 * Thank you so much for your help!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcode-to-create-default-field-value%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Krzysztof Piątkowski](https://wordpress.org/support/users/wckalkulator/)
 * (@wckalkulator)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/shortcode-to-create-default-field-value/#post-16282824)
 * [@samganti](https://wordpress.org/support/users/samganti/) Hi, you are able to
   update global parameter value by php code and then use that global parameter 
   in formula.
 *  Thread Starter [samganti](https://wordpress.org/support/users/samganti/)
 * (@samganti)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/shortcode-to-create-default-field-value/#post-16285757)
 * Hi, thanks a lot. How can I update the global parameter value by php code (where
   do I enter the code)? I only found your examples for numeric values, arrays and
   json objects.
 *  Thread Starter [samganti](https://wordpress.org/support/users/samganti/)
 * (@samganti)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/shortcode-to-create-default-field-value/#post-16288917)
 * Hi, please disregard the above, I found the solution.

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

The topic ‘Shortcode to create default field value’ is closed to new replies.

 * ![](https://ps.w.org/wc-kalkulator/assets/icon-256x256.gif?rev=2767665)
 * [Product Fields, Addons and Price Calculator for WooCommerce](https://wordpress.org/plugins/wc-kalkulator/)
 * [Support Threads](https://wordpress.org/support/plugin/wc-kalkulator/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-kalkulator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-kalkulator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-kalkulator/reviews/)

## Tags

 * [price calculation](https://wordpress.org/support/topic-tag/price-calculation/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 4 replies
 * 2 participants
 * Last reply from: [samganti](https://wordpress.org/support/users/samganti/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/shortcode-to-create-default-field-value/#post-16288917)
 * Status: not resolved