• Resolved civilvicky

    (@civilvicky)


    I want to create area calculator where user can enter the length and width in any unit.

    for ex:

    If user enter 2cm length and 4 ft width the answer (area) displayed should be as per his choice of selection.

    The page I need help with: [log in to see the link]

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

    (@codepeople)

    Hello @civilvicky

    The solution would be to convert every width and height to the same measurement unit, for example, millimeters, calculate the area in square millimeters, and then convert the area to the measurement unit selected through the fieldname9.

    You can do all calculations by yourself. You can enter the corresponding conversion factors as the values of the fields fieldname3, fieldname6, and fieldname9, enter the following equation in the calculated field:

    fieldname2*fieldname3*fieldname5*fieldname6/fieldname9

    Or you can use directly the Converter plugin. Please, click here

    Best regards.

    Thread Starter civilvicky

    (@civilvicky)

    will it be possible to have a look at one of the existing forms similar to this which uses converter plugin.

    Plugin Author codepeople

    (@codepeople)

    Hello,

    The use of the converter plugin is very straightforward.

    For example, assuming the choices’ values of the fields fieldname3 and fieldname6 are: millimeters, centimeters, inches, feet, meters, and yards. And the values of the fieldname9 choices: square millimeters, square centimeters, square meters, square inches, square feet, and square yards.

    The equation would be:

    CFFCONVERTER(CFFCONVERTER(fieldname2, fieldname3, 'millimeters')*CFFCONVERTER(fieldname4, fieldname5, 'millimeters'), 'square millimeters', fieldname9)

    Best regards.

    Thread Starter civilvicky

    (@civilvicky)

    I couldn’t understant it properly, but I have managed to built what I have in my mind, just have a look at the form once again.

    Plugin Author codepeople

    (@codepeople)

    Hello @civilvicky

    You’ve converted the values to meters and calculated the area in square meters. That’s correct.

    Now, you must do the same with the values in the fieldname9 field to convert the equation results from square meters to the measurement unit selected by the user.

    Best regards.

    Thread Starter civilvicky

    (@civilvicky)

    I have directly added the conversion value in the equation rather than the dropbox choices value. Working fine either way.

    Did you suggested me the same thing above or your solution was different.

    Plugin Author codepeople

    (@codepeople)

    Hello @civilvicky

    There is no unique way to implement a project. If your solution satisfies your project’s requirements, it is fine too.

    Please, note the support does not cover the implementation of the users’ projects (forms or formulas). If you need someone that implement your project, you can contact me directly through my website: Click Here

    Best regards.

    Thread Starter civilvicky

    (@civilvicky)

    One more thing is that, can we customise the single field or can we minimise the horizontal space between 2 fields.

    You can see this image. I want to built the form similar to this.

    Plugin Author codepeople

    (@codepeople)

    Hello @civilvicky

    Yes, of course. You can select the “Large” option for the field’s size attribute of the fields in the left column.

    Best regards.

    Thread Starter civilvicky

    (@civilvicky)

    thank you for the help. have a great day!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘calculation in any unit’ is closed to new replies.