Title: Predefined value
Last modified: January 2, 2024

---

# Predefined value

 *  Resolved [radu88](https://wordpress.org/support/users/radu88/)
 * (@radu88)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/predefined-value/)
 * Hey!
 * First of all, Happy New year!
 * I’d like your help to customize our calculated fields. Please check our page.
   We have the following flow:
 * What is your expected retail price? – fieldname7. This is a currency field and
   it has the value of “175” predefined and user can change it.
 * What is your VIP early bird discount? – fieldname75. This is a number field and
   it’s set to percentage and has the value of “40” predefined and the user can 
   change it.
 * Both fields work ok as expected.
 * Starting VIP early bird price: – fieldname16. This is currency field and it has
   the value of “500” predefined and the user can change it.
 * Ideally, fieldname16 would have a placeholder of fieldname7 – fieldname16%.
 * Example – if the user fills in 1000 at the retail price (fieldname 16) and a 
   40% discount for early bird (fieldname75), the starting vip early bird price 
   field (fieldname 16) would populate automatically with 600 unless the user changes
   it to something else – can this be possible?
 * Thank you!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpredefined-value%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/predefined-value/#post-17312965)
 * Hello [@radu88](https://wordpress.org/support/users/radu88/)
 * Thank you very much for using our plugin.
 * If you want to prefill the fieldname123 as the fieldname75 percent of the fieldname16
   value, you can use a calculated field for fieldname123 and configure it as follows:
    - Untick the “Read only” checkbox.
    - Tick the “If value entered manually, no evaluate equation” checkbox.
    - Tick the “If editable, format dynamically” checkbox.
    - Finally, enter the equation:
 *     ```wp-block-code
       fieldname16*(1-fieldname75/100)
       ```
   
 * Best regards.
 *  Thread Starter [radu88](https://wordpress.org/support/users/radu88/)
 * (@radu88)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/predefined-value/#post-17315979)
 * Hey!
 * Thanks for the reply. Unfortunately, it’s not working as expected. I created 
   a new calculated field and configured it as per your instructions and I get this–
   [https://prnt.sc/e7ap0yXaswwJ](https://prnt.sc/e7ap0yXaswwJ)
 * If I tweak your equation to this:
 *     ```wp-block-code
       fieldname7*(1-fieldname75/100)
       ```
   
 * I then get this – [https://prnt.sc/cjbai1VJi8z1](https://prnt.sc/cjbai1VJi8z1)–
   which in actual math, the equation would be:
 * fieldname7 * (1 – fieldname75/100)= 1000 * (1 – 40/100) = 1000 * (1 – 0.4) = 
   1000 * 0.6 = 600. The correct answer should be 600 but as you can see from the
   screenshot, it’s actually 996
 * What am I doing wrong? basically, the new calculated field should display the
   difference between fieldname7 minus fieldname75 which is a percentage field.
 * Thank you!
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/predefined-value/#post-17316266)
 * Hello [@radu88](https://wordpress.org/support/users/radu88/)
 * If you select the percent option as the field’s type in the fieldname75 settings,
   the plugin transforms its value into a decimal by itself, and you should not 
   divide it by 100.
 * So, the equation would be:
 *     ```wp-block-code
       fieldname7*(1-fieldname75)
       ```
   
 * Best regards.
 *  Thread Starter [radu88](https://wordpress.org/support/users/radu88/)
 * (@radu88)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/predefined-value/#post-17316287)
 * Perfect, works now, thank you so much!

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

The topic ‘Predefined value’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [radu88](https://wordpress.org/support/users/radu88/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/predefined-value/#post-17316287)
 * Status: resolved