Title: Max value warnings
Last modified: July 15, 2018

---

# Max value warnings

 *  Resolved [Alwin](https://wordpress.org/support/users/wp-opti/)
 * (@wp-opti)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/max-value-warnings/)
 * I use a Number fieldname1 with a MAX setting of value 300. When the value is 
   above 300 a warning message will be displayed.
 * But in the same form there is a field (a Calculated Field) where I want to show
   a warning when the MAX value of the fieldname1 is above 200.
 * Is that possible at all?
 * Thank you very much!

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/max-value-warnings/#post-10495561)
 * Hello [@wp-opti](https://wordpress.org/support/users/wp-opti/),
 * The alternative would be assign the special attribute “max” to the calculated
   field programmatically.
 * Assuming the name of the calculated field is: fieldname1, insert a “HTML Content”
   field in the form with the following piece of code as its content:
 *     ```
       <script>
       fbuilderjQuery(document).one('showHideDepEvent', function(){
       fbuilderjQuery('[id*="fieldname1_"]').attr('max',200);
       });
       </script>
       ```
   
 * and that’s all.
    Best regards.
 *  Thread Starter [Alwin](https://wordpress.org/support/users/wp-opti/)
 * (@wp-opti)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/max-value-warnings/#post-10501967)
 * Hello, thank you!
 * I have added a “HTML content” field with this code but now 200 is the max value
   for all number fields. That’s not what I am after at.
 * It is difficult to explain, maybe you can take a look at the form here:
    [http://loeka.optiion.nl/printen/](http://loeka.optiion.nl/printen/)
 * Now in the first 2 (number) fields there are max values settings:
    – the max 
   for “Verticaal in cm” is 111 cm – the max for “Horizontaal in cm” is 300 cm
 * When I higer value is entered a warning is displayed. So far so good…
 * But then please look at these checkbox fields:
 * -Polystyreen 1mm (maximaal 100×200 cm)
    -Polystyreen 2mm (maximaal 100×200 cm)-
   Polystyreen 3mm (maximaal 100×200 cm)
 * When one of these options is selected in the checkbox then I would like to display
   a warning when the field “Verticaal in cm” is a higher value then 100 or/and 
   the field
    “Horizontaal in cm” is a higher value then 200.
 * So bisicly the fields “Verticaal in cm” and “Horizontaal in cm” have a max value
   setting in the field setting itself, but I would like to use other max settings
   in other places in the form.
 * I hope you understand my question; thank you very much in advance for your help!
 * Regards,
    Alwin

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

The topic ‘Max value warnings’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form - AI Form Builder for WordPress - Contact, Payment, Quote, Quiz & More](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: [Alwin](https://wordpress.org/support/users/wp-opti/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/max-value-warnings/#post-10501967)
 * Status: resolved