Maths and data conversions

  • Profile Image
    SimplyWellbeing
    Asked on January 18, 2012 at 04:32 AM

    I would love to see a general purpose tool or functions to allow simple maths on input fields. Say add the entries in 5 boxes to give a total, or as OP wishes multiply number of items by cost to get a total amount.

    It would be even sweeter if you allowed some basic field conversion so that we could convert yes to a 1 and no to a 0, then total the result to say you said yes in 4 out of 5 cases etc.

  • Profile Image
    NeilVicente
    Answered on January 18, 2012 at 11:19 AM

    The ability to calculate field values was already suggested and is now in our feature wishlist. We will definitely make a grand announcement when this becomes available.

    Thank you for your inputs.

  • Profile Image
    WC2
    Answered on October 01, 2012 at 02:34 AM

    Is there any update to this issue? It would be very helpful to me, and convince me to subscribe to a premium acount immediately. 

     

    Thanks!

  • Profile Image
    danieldlopezp
    Answered on October 01, 2012 at 03:49 AM

    We still have plans to add this calculation feature but it is not ready jet, our developer team is working in multiple features and it is just matter of time until they can add this feature to the functionality of our site. Please be patient with this.

    Anyway there is a way how to do this using embedding code and JavaScript to add the calculations to you form. We will gladly help you to make the entire configuration if you want it. Just provide us the URL from the form to work.

  • Profile Image
    WC2
    Answered on October 01, 2012 at 04:18 AM

    http://www.jotform.us/WC2/INVOICE

    I am trying to Multiply the Quantity X PRICE ($) to auto populate the coresponding total amount field.

    I then would like to add all the total amounts of each item together to auto poulate the Total Price of Invoice field.

    I am not very comfortable with code so a step by step run through would be greatly appreciated.

    Thanks for the excellent and prompt response!!

  • Profile Image
    idarktech
    Answered on October 01, 2012 at 04:50 AM

    @WC2

    We'll try to create the scripts for your form to create such functions, we'll update you with this. Please stay tuned.

  • Profile Image
    idarktech
    Answered on October 01, 2012 at 06:30 AM

    @WC2

    Ok, try this.

    1. Get your form source code and paste it to notepad or any HTML editing tools you have.

    2. Copy this script and paste it below your form source code, must be after </form> tag.

    3. This should function like this: http://idarktech.com/test/test_calculation_form.html

    Let us know if need further assistance with this. Thanks!

  • Profile Image
    WC2
    Answered on October 01, 2012 at 01:51 PM

    Wow you are fast!

     

    So in the test calculation you made the quanity ADDS to the PRICE ($), but I need it to multiply, and input that total into the corresponding total amount.

    I don't know if this matters, but in this form there are 20 "items" that are conditionally connected to the previous "add another item command"

    all twenty of these item totals need to be acocunted for in the "invoice total" at the bottom.

    Thanks, this is quite possibly the best service I have ever recieved!! you guys are great!

    This is the finalized version of the form with all twenty items built in.

    http://www.jotform.us/WC2/INVOICE

  • Profile Image
    idarktech
    Answered on October 01, 2012 at 10:49 PM

    WC2,

    Thanks for your great feedback, we greatly appreciate it!

    Here's the final code: http://pastie.org/4894469. This should now multiply :)

    Same step, just paste it at the bottom part of your form source code. 

    Just let us know if you run into any problems. Have a nice day!

  • Profile Image
    WC2
    Answered on October 02, 2012 at 02:52 PM

    Looks great, but I didn't realize I couldn't add the code to the form on the jotform.com website. (Makes sense now that I think about malicious code)

    Will all the submission emails, and connectivity to google docs still operate normally hosting this on an external site?

     

  • Profile Image
    Rodjit
    Answered on October 02, 2012 at 03:55 PM

    @WC2

    Will all the submission emails, and connectivity to google docs still operate normally hosting this on an external site?

    -Yes.

  • Profile Image
    District1010
    Answered on January 30, 2013 at 08:46 AM

    I guess in common with many others I await the inclusion of simple mathematical funcions with much anticipation and need.  In the meantime I note that Oct 1st 2012

    http://www.jotform.us/WC2/INVOICE

    supposedly has this built in by way of scripting I wonder if it would be possible to have or show somewhere the differences so that I and no doubt others can begin to work out what is needed to achieve this on our own forms.  I guess you could call it a simple, very defined, lesson in scripting?

    Thanks

  • Profile Image
    Welvin
    Answered on January 30, 2013 at 10:27 AM

    @Disctrict1010,

    We do apologize. I know that our developers are aware of this and as mention by my colleague Neil, this is already added to our feature request list. We just can't give you an update about this due to the fact that there are matters that needs to be address first.

    Your understanding and patience on this matter is highly appreciated.

    Thanks