• Resolved leppi

    (@leppi)


    Hello,

    I’ve build a form with this great plugin but when the amount is 0 in a number-field because it’s not filled in the result in email shows 1. When the amount is 1 or higher there’s no problem.
    I read something about problems with value 0 but the calculation works fine, even when some fields are not filled in.

    Example filled in form:
    0 product one
    4 product two
    0 product three

    Email send:
    {number-1} – product one
    {number-2} – product two
    {number-3} – product three

    Email recieved:
    1 – product one
    4 – product two
    1 – product three

    I’ve tried different things to fix this. Changed default value, changed limits minimum en tried different sorts of email body.

    You can find my form export here:
    https://we.tl/t-vEgwCKDUAM

    Can someone please help me out? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter leppi

    (@leppi)

    After some trial and error I’ve found the issue.

    I used the visibility option and that’s not possible with a number field.
    The number field shows when a checkbox is checked. That works fine but when the checkbox isn’t checked and the number field doesn’t show the default number for that field that shows in email is 1 and not 0.

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @leppi,

    Thank you for bringing this to our notice.

    I checked this on a test site and was able to replicate the issue. I have brought this to the notice of the Forminator developer so that we can check this further and improve this behavior in one of our upcoming updates.

    Kind Regards,
    Nebu John

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @leppi

    We’ve got feedback from our developers and it seems that this is a “side-effect” of how these calculations (with conditional visibility logic) are handled in order to avoid “infinity error” if division by 0 happens.

    Wrapping the “hidden” (or rather conditional) values in regular round brackets should solve this, like this:

    {checkbox-4}*({number-4})+{checkbox-2}*({number-2})+{checkbox-3}*({number-3})+{checkbox-5}*({number-5})+{checkbox-6}*({number-6})

    Best regards,
    Adam

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @leppi ,

    We haven’t heard from you for a while now, so it looks like you don’t have more questions for us.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Number {number-} shows 1 in email, even when amountis 0.’ is closed to new replies.