• Resolved dealerprincipal

    (@dealerprincipal)


    Building a form with Calculated Fields to show various math solutions when a variable is chosen. Start with a fixed number in fieldname2. Separator1 for info only. Slider, fieldname3, to choose a percent from 1 to 50. Calculator, fieldname1, to multiply fieldname2, by fieldname3. Example 280 in fieldname2, .10 in fieldname3. Result in fieldname1, 28 10% of 280 is 28. Simple.

    Can’t get the proper formula in the Calculated field where the Set Equation window in Field Settings.

    The next problem would be how to make the first reference in the next set to fieldname1 above. The first set would be duplicated 5 times.

Viewing 1 replies (of 1 total)
  • Plugin Author CodePeople2

    (@codepeople2)

    Hello @dealerprincipal

    Thank you so much for using our plugin.

    If fieldname1 is a number, and fieldname2 is a slider field from 1 to 50 that you want to treat as a percentage, the equation in the set equation attribute of the calculated field would be:

    fieldname1*fieldname2/100

    If you want to allow only two decimal places, you can edit the equation as follows:

    PREC(fieldname1*fieldname2/100, 2, true)

    PREC(x, y) rounds the number x with y decimals. Passing true as the third parameter tells the plugin not to include .00 when x is an integer number.

    Once the first pair is created, you can duplicate it as many times as you want. To simplify the process, include them in a DIV field and duplicate it. Please watch the following video:

    https://resources.developers4web.com/cff/tmp/2025/04/20/video.mp4

    Best regards.

Viewing 1 replies (of 1 total)

The topic ‘simple math problem.’ is closed to new replies.