1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Suggestions for calculator forms?

Discussion in 'XenForo Development Discussions' started by nrep, Oct 16, 2015.

  1. nrep

    nrep Well-Known Member

    I'm looking to add a calculation area to one of our sites, so that people can generate answers to simple equations by filling in a form. Ideally I'd like to do this in JS, rather than submitting data to the server.

    I know that I can do this manually by creating lots of fields and then coding the calculation in JS (there are many tutorials out there), but what I was hoping for was some sort of jQuery plugin (or similar) that will help me generate the form much more easily, as I have a huge number of pages to create.

    Has anyone done this before within XF? I would be very interested to hear how you would go about adding a repository of calculators to your site, as I'm not sure on the best way to code this.

    An example of the sort of calculator I'd like is as follows:

    Units: Radio buttons for Meters or Feet
    Mass: Numeric Only Field
    Acceleration: Numeric Only Field
    Force: Calculated based on MxA, correct unit appended

    I've seen a script called "NightOwl" at codecanyon that almost does what I'm after, but the "mini calculator" feature doesn't show all of the fields on the page and won't allow me to add a radio buttons.
     

Share This Page