• Resolved MichaelPalazzolo

    (@michaelpalazzolo)


    Hi there,
    Great plugin – just having one issue. I’m trying to build a three column calculator (user input value * predefined value = total). I can’t seem to set a predefined value that automatically gets calculated after the user inputs their own value in the first field. Is there any way to do this?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @michaelpalazzolo

    The plugin includes different alternatives to distribute the fields in columns, like using container fields, or assigning the predefined class names to the fields.

    The simpler alternative:

    – Insert a Div field in the form, and select the “3 Columns” option for the “Columns” attribute in its settings.

    – Move the other fields inside the Div field.

    More information about the distribution of fields in columns, reading the following post in the plugin’s blog:

    https://cff.dwbooster.com/blog/2019/01/06/columns

    – Concerning to the equation, if the other fields in the form are fieldname1 and fieldname2, the equation associated to the calculated field would be as simple as: fieldname1*fieldname2

    and that’s all.
    Best regards.

    Thread Starter MichaelPalazzolo

    (@michaelpalazzolo)

    Thanks very much. I am able to figure out the columns.

    In your example, how would I set a value for “fieldname2” that would apply to the total and that the user is unable to change? For example, I’d like “fieldname2” to be 16, so that the number the user enters in “fieldname1” is always multiplied by 16.

    Thanks

    Plugin Author codepeople

    (@codepeople)

    Hello @michaelpalazzolo

    There are different alternatives, the simpler one, use directly the number 16 as part of the equation: fieldname1*16

    Second alternative, insert as the second field a hidden field.

    Third alternative, insert as the second field a number field, but tick the “read only” checkbox in its settings.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to Calculate using Predefined value’ is closed to new replies.