Hello all,
In developing a site that makes heavy use of Gravity Forms, I’ve noticed a behavior that is causing me some issues and I’m wondering if there is a way to modify or disable it; I cannot seem to find a relevant filter or action to hook into in the documentation.
I have a couple Number fields on a form that do not have calculations enabled. Due to the needs of the information being collected, we need to be able to accept a decimal value with 5 or 6 places past the decimal point (a number like “21.62014”). However, it appears that somewhere in the submission process, these values are being automatically rounded to 4 places (“21.6201”). I see that it is possible to affect the rounding precision of Number fields that do have calculation enabled, but that the maximum precision is 4 places; that coincidence makes me wonder if it’s related. Debugging through hooking into each filter along the process seems to indicate it is occurring sometime between gform_trim_input_value and gform_save_field_value (by the time it goes to save the field value out to an entry the GF_Field object’s defaultValue has already been rounded.)
So, the short version: is it possible to disable or override whatever is forcing this arbitrary precision on Number fields that do not have calculation enabled? Or is our only option to change these to a text entry field and convert them back into floats on the back-end? Thank you so much!