• I have numeric field hours and numeric field days. I am using numerical calculation to get the total value of both fields and it is working great but I have a little problem couldn’t solve. For example, when there is a value of 8 in field hours and a value of 6 in field days the numerical calculation is showing 48, using the multiplication operation. If I delete the value from any field hours or days and leave it blank the numerical calculation returns the same value 48 with when I expect it to be 0. Is there a solution for that?
    I hope I was clear enough to express the matter.

    Many thanks again

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author xnau webdesign

    (@xnau)

    The solution is to set the default value of your numeric fields (not the calculation field) to 0.

    Thread Starter ladober

    (@ladober)

    Thanks Roland,

    I tried that before posting the question in here but it didn’t work!
    If the default value set to 0 then the field will be 0 before the first use. After changing the value to a different number and save it and then delete the value and make the filed blank it will not return to 0 it will remember the last number used.

    Plugin Author xnau webdesign

    (@xnau)

    OK, how exactly are you “deleting the value”? I’d like to test this.

    Why not set the value to 0 instead of deleting?

    Thread Starter ladober

    (@ladober)

    Sorry Roland it is not a big deal I can add the 0 number and the problem would be solved. I am deleting the value with backspace or delete button. But I am just used to deleted value or blank value would equal 0.

    Many thanks for your reply

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Set numeric value to 0 if blank’ is closed to new replies.