Title: Amount Field &#8211; Conditional
Last modified: August 24, 2018

---

# Amount Field – Conditional

 *  Resolved [manpasand](https://wordpress.org/support/users/manpasand/)
 * (@manpasand)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/)
 * Hello, I have a problem with Conditional Logic for filling the amount. I am ONLY
   asking the GROSS INCOME from the user and rest of the two calculations (home 
   expenses and business expenses) I am doing with the form. I have setup max amount
   for Home Expenses ($3000) and Business Expenses ($2000).
 * Now the problem is, if business expenses goes beyond to that amount, form input
   should show only $2000 BUT if it is less than $2000 input shows actual figure(
   e.g. $1584).
 * I facing problem in the Formula Builder to show the amount.
 * How can I fix that?

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/amount-field-conditional/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/amount-field-conditional/page/2/?output_format=md)

 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10622125)
 * Err… sorry i didn’t understand your problem, do you want a field that if they
   put more that the maximum amount it uses the maximum amount and if it is lees
   than the maximum amount it uses the actual amount submitted?
 *  Thread Starter [manpasand](https://wordpress.org/support/users/manpasand/)
 * (@manpasand)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10622178)
 * Sorry, I want user amount should compare with $2000 if the it is low then show
   the actual lower figure but if the amount is higher than $2000 then figure should
   show only $2000.
 * During my research I found a link in Google at [https://goo.gl/Pkoq1R](https://goo.gl/Pkoq1R)
 * Here, if I put Gross income $3000 then INCOME TOTAL AMOUNT shows $2770.50 BUT
   I want it should show only $2000 because $2770.50 is is higher than $2000.
 * BUT at the same time if I put gross income $2000 then INCOME TOTAL AMOUNT shows
   $1847 that will not change because $1847 is lower than $2000.
 * I don’t know what form they are using but its first three inputs (Income, FICA
   and Income total) will work for my model of form.
 * So how to configure via Formula Builder.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10622207)
 * Ok, so if i understand correctly you will have two fields ‘Gross Income’ and ‘
   Income Total Amount’
 * Gross Income is going to be an editable field that your user is going to fill
   and income total is going to be a either 2000 or the same as ‘Gross Income’ whatever
   is less. Am i right?
 * If so in your ‘Income Total Amount’ field should use this formula:
 * `Math.min([Gross Income], 2000)`
 *  Thread Starter [manpasand](https://wordpress.org/support/users/manpasand/)
 * (@manpasand)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10623212)
 * Yes, you are right.
 * Getting Syntax Error when I use `Math.min([Gross Income], 2000)` OR `RNFRound
   Math.min([Gross Income], 2000)` in the Formula Builder.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628114)
 * Yes sorry for that, the validator doesn’t understand that Math.min, please try
   to execute the formula and see if it works. If it is still not working please
   let me know!
 *  Thread Starter [manpasand](https://wordpress.org/support/users/manpasand/)
 * (@manpasand)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628385)
 * What formula I should use?
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628399)
 * something like this:
 * Math.min([Gross Income], 2000) OR RNFRound Math.min([Gross Income], 2000)
 * Instead of [Gross Income] you should place the field that you want to use there.
 * Regards!
 *  Thread Starter [manpasand](https://wordpress.org/support/users/manpasand/)
 * (@manpasand)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628411)
 * Used RNFRound Math.min(`Gross Income`, 2000)
 * Getting error “unexpected identifier”
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628425)
 * Do you get that error when you execute the form?
 *  Thread Starter [manpasand](https://wordpress.org/support/users/manpasand/)
 * (@manpasand)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628436)
 * Input field shows **undefined**
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628440)
 * could you send me a link to your form please?
 *  Thread Starter [manpasand](https://wordpress.org/support/users/manpasand/)
 * (@manpasand)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628447)
 * I have no problem but I will ask from the client first. Will update you soon.
 *  Thread Starter [manpasand](https://wordpress.org/support/users/manpasand/)
 * (@manpasand)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628636)
 * [@edgarrojas](https://wordpress.org/support/users/edgarrojas/) Thanks for your
   help… it works now by using Math.min(`Gross Income`, 2000)
 * May be spacing problem my end.
 * THANKS FOR YOUR TIME & GREAT HELP.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628649)
 * Ah great!
 * You are welcome =), let me know if you have any other issue or question.
 * Regards!
 *  Thread Starter [manpasand](https://wordpress.org/support/users/manpasand/)
 * (@manpasand)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/#post-10628697)
 * One small question…how can I add $ (dollar) sign in the amount input fields?

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/amount-field-conditional/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/amount-field-conditional/page/2/?output_format=md)

The topic ‘Amount Field – Conditional’ is closed to new replies.

 * ![](https://ps.w.org/smart-forms/assets/icon-256x256.jpg?rev=1226707)
 * [Smart Forms - when you need more than just a contact form](https://wordpress.org/plugins/smart-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-forms/reviews/)

 * 16 replies
 * 2 participants
 * Last reply from: [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/amount-field-conditional/page/2/#post-10628709)
 * Status: resolved