What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Adding calculations/formulas feature

    Asked by thcm on May 31, 2013 at 03:24 PM

    Source Code help for simple math?

    I need to pre-populate a field using the number of items purchased in the purchase order field multiplied times 20% (or divided by 5).  Any thoughts?

    Page URL:
    http://form.jotform.us/form/31505524369151

    source purchase order field purchase items calculating
  • Profile Image

    Answered by sidharth_kch on May 31, 2013 at 04:18 PM

    @thcm

    Is your form complete?

    If you are okay to use your form's source code to embed your form, we can provide you with a workaround using custom javascript code.

    Please let us know exact requirement like: field 1 * field 2= field 3

    Thanks,

    Sidharth

  • Profile Image

    Answered by thcm on May 31, 2013 at 04:24 PM

    It's mostly complete.  I'm tinkering a bit.  Does it need to be complete before adding the code?

     

    I'd like to take the submitted number of students under "Pricing" and multiply it by 0.2 and auto populate the "Number" field.

     

    Thank you!

  • Profile Image

    Answered by sidharth_kch on May 31, 2013 at 04:32 PM
    Yes your form needs to be completed and then only I can download your form's source code to implement the work around. Please let us know when your form is complete.Thanks, Sidharth
  • Profile Image

    Answered by thcm on May 31, 2013 at 04:33 PM

    It is complete now.  Thank you.

  • Profile Image

    Answered by gwgrubb on June 20, 2013 at 10:21 AM

    Did it work?

    Paypal simply  takes whatever the registration form sends them then adds their charges which are. 2.9% of the ttl regist fee plus a flat fee of 30cents per transaction. To beat this we have to update / upcharge from the jotform side… HOW TO DO SO????????????This is the only way we break even on fees. You can set up two more line items in each registration page that take the ttls , chrg the 2.9 then add 30cents….Then when they submit, it goes on to paypal.

     

  • Profile Image

    Answered by dinesh-it on June 20, 2013 at 10:59 AM

    @gwgrubb 

    I think you have created a new thread with the same question.

    Thank you for that. We always like this - one question per thread. 

    You will get responce via that thread as soon.

  • Profile Image

    Answered by Jamie on July 11, 2013 at 12:39 PM

    I'll still searching for a solution.  Perhaps I can utilize the setup/contents of another form template and combine the two?  I saw an option for embedding one form into another but couldn't figure it out.  My original form is below.

    http://form.jotform.us/form/31505524369151

     

    I'd like to embed this form http://jotformpro.com/form/31914128750957 just above the "number" field in the first form. 

    Also, in a perfect world I could have a work around code to complete and populate my simple math in the "number" field.  Quantity * dollar amount and then populate in the field.  Is that do-able?

    Thank you!

  • Profile Image
    JotForm Support

    Answered by Mike_T on July 11, 2013 at 02:26 PM

    I'll still searching for a solution. Perhaps I can utilize the setup/contents of another form template and combine the two?

    We can help with embedding into the main form. However, this method is not submitting multiple forms. In other words, your form user will be able to submit only one form at once, information from other form (main or embedded) will be skipped.

    Also, in a perfect world I could have a work around code to complete and populate my simple math in the "number" field. Quantity * dollar amount and then populate in the field. Is that do-able?

    Yes, this is possible, but the code will be different in each case. Could you please create a new thread with your requirements? Then, we will try to help you with the code for your particular form.

    Thank you.

  • Profile Image

    Answered by thcm on July 11, 2013 at 02:30 PM

    I understand the second part and will be happy to submit a second thread.  However, I do not understand your explanation for the first query.

  • Profile Image

    Answered by sidharth_kch on July 11, 2013 at 03:38 PM

    @thcm

    You can display both the forms together but you won't be able to submit both the forms together. You will be able to submit only one form at a time.

    Thanks,

    Sidharth

  • Profile Image

    Answered by thcm on July 11, 2013 at 03:57 PM
    Can i just pull the fields (copy) from the admission form into the field
    trip form to replace the pricing structure, leaving me with one form?
  • Profile Image
    JotForm Support

    Answered by KadeJM on July 11, 2013 at 05:44 PM

    Yes you can pull the field data via url parameters but as far as replacing the whole pricing structure i'm not quite sure that would work out unless you made a change to suit this otherwise it may not transfer correctly to the second form. You can also look here at this thread http://www.jotform.com/answers/93645-How-do-I-prepopulate-fields-in-one-form-with-text-input-from-another-form for reference on this that was provided by one of my colleagues. 

  • Profile Image

    Answered by gwgrubb on July 12, 2013 at 08:37 AM

    I used a different tactic, but thanks anyway.



    Thank You

    Gary W. Grubb, MBA
    MAHAN & ASSOCIATES, LLC
    Phone 615-883-7800
    Fax 615-883-7840
    www.mahanassociates.com

    Stay Connected With Us
    Register for our Fall Conference www.DentalSummitNashville2013.com



  • Profile Image

    Answered by thcm on July 12, 2013 at 10:42 AM
    I could probably bypass all of this if I could figure out how to recreate
    the layout I used (from a template) in my admissions form and build it
    directly in my field trip form. I've tinkered with the options and can't
    figure out how to make an expandable dropdown menu. Any ideas?
  • Profile Image
    JotForm Support

    Answered by KadeJM on July 12, 2013 at 11:32 AM

    @gwgrubb

    No problem, glad to hear you were able to figure out something to your liking and thank you for letting us know. 

     

    @thcm

    What do you mean by Expandable Dropdown Menu? I'm not quite sure I understand you since the dropdown already expands to show a list normally. Perhaps you meant like a scroller or something inside the dropdown list?

    I googled it but found different variations of the meaning behind this. So can you explain more and we'll see if we can figure out something more on this.

  • Profile Image

    Answered by thcm on July 12, 2013 at 02:54 PM

    I think I've figured everything out except for my original question of a simple math source code.  My template is completed and can be found below.

    http://jotform.us/form/31505524369151

     

    I am trying to add math to the Admission fields.  Each line as a price listed and a box to input the desired quantity.  There are three such lines/fields and then a total at the bottom.  They should only fill in one of the three fields, leaving the other two at their default of zero.  I'm looking to automatically populate the fourth field labeled "Total" through at formula that would accomplish something like this...

    ($5 * inputted number) + ($4 * inputted number) + ($6 * inputted number) =

    Does that make sense?  Is a workaround possible?  Thank you for your help.

  • Profile Image
    JotForm Support

    Answered by Mike_T on July 12, 2013 at 04:25 PM

    It should be possible. I will check this and get back with update later today.

  • Profile Image
    JotForm Support

    Answered by Mike_T on July 12, 2013 at 08:41 PM

    I have created an example of:

    $5 * inputted number = total

    $4 * inputted number = total

    $6 * inputted number = total

    You will need to:

    1. Get form source code.

    2. Embed form code to your web page.

    3. Add this script after the </form> closing tag.

    Example:

    https://shots.jotform.com/mike/examples/simple-math.html

    Thank you.

  • Profile Image

    Answered by thcm on July 15, 2013 at 11:23 AM
    Thank you so much!
    I'm having a couple of issues.
    1. The when I preview the form within Jotform, it is completed. However,
    when I grab the source code and paste it into my website, it eliminates the
    bottom portion of my form.
    2. The pasted portion show little grey knobs next to the form that don't
    appear in the preview.
    3. I pasted the new script after the but it didn't show anything.
    But, that may be due to not seeing the bottom part of my form.
    Any ideas?
  • Profile Image

    Answered by thcm on July 15, 2013 at 11:26 AM
    I'm using Joomla, by the way.
  • Profile Image
    JotForm Support

    Answered by EltonCris on July 15, 2013 at 12:27 PM

    Hi,

    1. This might be due to code conflicts. Joomla runs with many javascript libraries so embedding form source code in your Joomla page might clash with the existing scripts. I would suggest to try using plugins for embedding source codes, this might help.

    2. Conflicts with CSS or your form CSS was overridden with your existing CSS codes, this might be the reason why. It would be a lot easier for us if we can check the page where you've embedded your form so we can check and diagnose it here.

    3. You will not be able to see new things on the second script, it will just do calculations on your admissions number fields as seen on my colleagues demo

    Regarding on the plugin recommendation, you can use Jumi or JIncludes for Joomla2.5.

    Let us know if you have further questions. Thanks!

    Thanks!

  • Profile Image

    Answered by thcm on July 15, 2013 at 01:12 PM

    1. This is the second Jotform that I've embedded but I didn't use plugins or have issues with the first.  That made me think it may be the more complicated script.  However, I will take a look at the plugins for this one.

     

    2. The page is http://thchildrensmuseum.com/index.php?option=com_content&view=article&id=276&Itemid=159

     

    Thank you.

  • Profile Image

    Answered by thcm on July 15, 2013 at 01:31 PM

    The remainder of the form shows up when I select the last expandable menu labeled "Admission with carry-in sack lunch".  That's curious?

  • Profile Image
    JotForm Support

    Answered by Mike_T on July 15, 2013 at 02:17 PM

    Added javascript code will not work without form source embedding method, so you can try the form source via some plugin.

    The remainder of the form shows up when I select the last expandable menu labeled "Admission with carry-in sack lunch". That's curious?

    This is how the Form Collapse field is acting. To solve this, you can add one more Form Collapse field before/after the Total field, and set that collapse to Status - Open, Visibility - Hidden.

  • Profile Image

    Answered by thcm on July 15, 2013 at 02:19 PM

    You guys are terrific!  I'll give it a shot!

  • Profile Image

    Answered by thcm on July 15, 2013 at 02:36 PM

    Ok, not as smart as I thought I was.  Problem #2 is solved...thank you!

    I still am not understanding combining both source codes into the joomla admin page.  If I copy/paste the shorten "embed form", the original form embeds and looks beautiful.  If I try to copy/paste the extremely long source code and add the second script (so my math computes), the margins are off, there are dots along the left side and the math doesn't work.  Sorry for the trouble, but I'm confused.

  • Profile Image
    JotForm Support

    Answered by Mike_T on July 15, 2013 at 03:28 PM

    It looks like that some important code is being stripped by Joomla, so this is not working right. To solve this we can try some plugin/extension that can help with code embedding into your Joomla, like:

    - Jumi

    - JIncludes

    - Sourcerer

    Can you please try these extensions to see if that helps? Thank you.

  • Profile Image

    Answered by thcm on July 15, 2013 at 03:51 PM

    I can't figure it out.  I think I'm going to cut my losses.  Thank you for your assistance, though.

  • Profile Image
    JotForm Support

    Answered by Mike_T on July 15, 2013 at 05:09 PM

    If you need help with the Joomla source code embedding, please create a new thread. So that we will be able to handle it and do our best to help you.

    Another way that you can try is our Purchase Order tool, it can have different products with quantities and Total.

    Example:

    http://form.jotform.co/form/31956367712865

    Also, we do agree that we need some calculations/formulas feature on forms. I have forwarded an additional feature request ticket to our Development Team, and I hope that we will get that option  implemented at some point.

    Thank you.

  • Profile Image

    Answered by thcm on July 16, 2013 at 03:37 PM
    I attempted the purchase order route before. I'm not opposed to it but I
    liked the look of the expandable lists which also gave the effect of
    selecting only one type. Although not as atheistically pleasing, is there
    the possibility to only select one option with the purchase order feature?
    Thank you.
  • Profile Image
    JotForm Support

    Answered by Mike_T on July 16, 2013 at 03:55 PM

    Yes, we have the "Users can choose only one product" option for this. It is available on any payment tool.

    This will switch the product selection from multiple products (check boxes) to single product (radio buttons).

  • Profile Image

    Answered by thcm on July 17, 2013 at 09:34 AM
    This could definitely work!
    If I select "Sell Products" and "Users Can Only Choose One Product", can
    they see a total at the bottom? Seeing a total is key to our form. If we
    use a workaround, are we back to the same issues with Java/Joomla?
  • Profile Image

    Answered by pinoytech on July 17, 2013 at 10:33 AM

    Hi,

    To show Total on your form Product field, please take a look at this video: http://www.screencast.com/t/u02O9fgHDCQ5

    If you need further assistance, please let us know.

    Thank you!