You are viewing limited content. For full access, please sign in.

Question

Question

Calculation and invalid value in forms

asked on July 6, 2015

Hello,

 

I had to make some calculation in a Laserfiche webform. I serched and found that topic :

https://answers.laserfiche.com/questions/47631/How-do-I-perform-calculations-on-fields-in-Forms

And that section of online help :

https://www.laserfiche.com/support/webhelp/laserficheforms/9.0/en-us/forms/#CustomizingYourFormExamples.htm

I have used the "Purchase order example".

Everything works great except one thing, if I type a float number, the calculation is made but I have an error message on the field "Invalid value".

NB : I send a screenshot in attachement but I use the French version.

 

valeur incorrecte.JPG
0 0

Answer

SELECTED ANSWER
replied on July 7, 2015 Show version history

Are you using number field on the "Montant" column? Currently we do not support fload number on number field. You can use single line or currency field instead.

1 0
replied on July 7, 2015 Show version history

Actually, there's a very easy to make a number field work for this.

HTML number inputs have a "step" attribute that defaults to 1, but you can change it to a decimal to make it accept floats.

For example:

$("#Field3").attr("step", "0.01");

This will allow you to enter values such as 9.82 into the number field, but no alphabetic characters.

EDIT: This also lets you do some potentially useful things, such as allow only numbers that are divisible by the step number. E.g. setting it to 2 will make it accept only even numbers in that field.

0 0

Replies

replied on January 15, 2016

Hi there,

Number field support decimals in Laserfiche Forms 10.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.