{"id":15693410,"date":"2022-05-30T20:29:22","date_gmt":"2022-05-30T20:29:22","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/set-numeric-value-to-0-if-blank\/"},"modified":"2022-05-30T20:29:22","modified_gmt":"2022-05-30T20:29:22","slug":"set-numeric-value-to-0-if-blank","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/set-numeric-value-to-0-if-blank\/","title":{"rendered":"Set numeric value to 0 if blank"},"content":{"rendered":"<p>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\u2019t 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?<br \/>\nI hope I was clear enough to express the matter.<\/p>\n<p>Many thanks again<\/p>\n","protected":false},"template":"","class_list":["post-15693410","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15693410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15693410\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15693410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}