• Resolved m1k3w

    (@m1k3w)


    Hi

    I have made a form that has various questions and i have associated points against them that get added together in the calculation field to provide a score

    My problem is that on a on a number field the points are capped at 15, previously i had managed to do this by setting a limit on the number field to 15 and in the calculation field i have the equation ({number-1}*1)

    This worked fine

    but i have now asked to remove the limit from the number field but retain the cap on the points

    is there any equation that would add up till 15 and then cap out

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @m1k3w !

    Hope you’re doing well today!

    Yes, Forminator has a couple of additional functions you can use, including min() and max() functions, so to do this, you can do:

    min({number-1}, 15)

    This will select the smaller value, so:

    – if number-1 is less than 15 – use number-1
    – if number-1 is more than 15 – use 15

    There are other such functions available, you can see the full list here: https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#calculations-tab

    Warm regards,
    Pawel

    Thread Starter m1k3w

    (@m1k3w)

    Thank you so much @wpmudev-support9

    I was hoping there was something like that using min and max but i had discounted it as i can’t seem to type a comma into the calculation box?

    but it looks like you can paste them in

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @m1k3w,

    as i can’t seem to type a comma into the calculation box?

    I have brought this to the notice of the Formiantor developers to bring some improvement to this behaviour.

    As for now, please paste the formula as it works fine.

    I am marking this ticket as resolved. Please open a new ticket if you need any further help.

    Kind Regards,
    Nebu John

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘capping a number equation to set number’ is closed to new replies.