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

    Basic fee calculator

    Asked by RHemery on April 17, 2013 at 05:43 AM

    Hi there

    We are setting up a basic fee calculator form, where the user answers a series of questions via radio buttons.

    One of the outcomes is that the user has a 50% reduction in the cost of their product (in this case a College course).

    Is there anyway in JotForm you can have an input box, they type in a number, say £1755 and it automatically outputs 50% of that price in another input box (£877.50)?

    Thanks

    Rich

    JotForm radio buttons product thanks
  • Profile Image

    Answered by sidharth_kch on April 17, 2013 at 07:30 AM

    @RHemery

    Unfortunately, that wont be possible at this time. 

    If you are okay to use source code embed method, we can provide you a workaround using javascripts.

    Let us know.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 17, 2013 at 07:33 AM

    Hi - a workaround would be good, thanks.

  • Profile Image

    Answered by sidharth_kch on April 17, 2013 at 07:37 AM

    @RHemery

    You complete your form and then let me know the criteria of calculation and which field will display the value. 

    We will implement that in your form.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 17, 2013 at 09:27 AM

    http://www.studiohem.com/feecalc/part-time-level2.htm

     

    Above is an example of the form.

    If you click on:

    'Me'

    'Yes'

    'No'

    'No'

    'No'

     

    You will be presented with the Conditions that produce a Header that states 50% off your course fee.

     

    What I would like would be a text box right at the start of the form to enter the course fee in, e.g. "£700", and then if the user was to get to the 50% off header, a text field would appear with the initial fee with 50% off: £350.

     

    Does that make sense?

    Thanks

    Rich

  • Profile Image

    Answered by sidharth_kch on April 17, 2013 at 09:53 AM

    @RHemery

    So You need one text box to be added at the start of the form where you will enter the cource fee amount (or this will be pre populated?). 

    Then when the users answers and sees this message "You are entitled to 50% OFF your course fee." below this you need one text box to display 50% amount of first text box?

    Let me know if this is what you want and i will work on it. Look and feel / placement of text can be taken care.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 17, 2013 at 10:02 AM

    Hi Sidharth

    Thanks so much for looking for a solution for me.

     

    Yes, that is right - I would imagine they would have to enter the course fee amount into a text box at the start manually.

    Within the form, the conditions produce an outcome of either:

    - 100% of course fee has to be paid: so if they put in £1000 at the start, it would display in a text box that they have to pay £1000.

    - 50% of course fee has to be paid: so if they put in £1000 at the start, it would display in a text box that they have to pay £500.

    - 0% of course fee has to be paid (course is free): so if they put in £1000 at the start, it would display in a text box that they have to pay £0.

     

    However,you mentioned that the course fee could be pre-populated. This is what the ideal solution would be but I have no idea if it is possible?

     

    Currently the course fee is listed on course pages, e.g. http://www.studiohem.com/bc/course-page-parttime.html

    You can see at the bottom the fee is £185.00. The course fee calculator will launch in a pop up when you click the fee. Is there anyway for the £185.00 to pre-populate a textbox in the fee calculator, rather than the user having to type out £185.00 at the start of the form?

     

    Thanks

    Rich

  • Profile Image

    Answered by sidharth_kch on April 17, 2013 at 10:10 AM

    @RHemery

    I see that your Fees is 185.00. We can have this pre-populate in the textbox. I will work on this and get back to you.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 17, 2013 at 10:11 AM

    Thanks Sidharth.

    Yes in this occasion the fee is £185.00 but the fee amount could be anything as we have lots of courses! Does that make a difference?

    Thanks

    Rich

  • Profile Image

    Answered by sidharth_kch on April 17, 2013 at 10:43 AM

    @RHemery

    That wont be an issue. We can have a user select from a list of courses to populate the first field. For now lets start with pre-populated value of 185.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 18, 2013 at 10:07 AM

    Great thanks.

  • Profile Image

    Answered by sidharth_kch on April 19, 2013 at 04:29 PM

    @RHemery

    I have cloned your form and implemented the workaround. Download your form () source code and replace the HTML code with this one: http://pastie.org/7666606

    If this is okay with you i shall work on your form and implement the same changes.

    Lets me if this solves your issue.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 22, 2013 at 05:34 AM

    Hi Sidharth

    Thanks very much for your help.

    This is good progress from what we had previously.

    However, the course fee is not always going to be £185. It varies depending on what type of course it is.

     

    Is there anyway, for the course fee value to be inserted into the first text box depending on the Course Fee on a different page? For example, if the Fee Calculator was to be launched via this page (http://www.bedford.ac.uk/our_courses.aspx?id=119131&mode=P), is there anyway the form could know and input the Fee of £2580 or whatever the Fees said?

     

    Thanks

  • Profile Image

    Answered by RHemery on April 22, 2013 at 05:34 AM

    What you have done though is good and we can use this if the above is not possible.

  • Profile Image

    Answered by sidharth_kch on April 22, 2013 at 05:45 AM

    @RHemery

    How are you planning to redirect your user from this page to fee calculator form? Are you going to have a hyperlink on your "our course" page.

    If that is the case then its possible to prepopulate fees textbox with other value. Let me know and i will create a demo for you later today.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 22, 2013 at 05:49 AM

    Hi Sidharth

    We are a College that has hundreds of courses, all with different fees.

    We have a course search on our website. When the user searches for a course, they can go through to a Course page which lists a Course Fee (which can be anything). For example, a course page is this: http://www.bedford.ac.uk/our_courses.aspx?id=119131&mode=P)

     

    What we plan to do is where it says the 'Fees' on that page, we will put a hyperlink to the fee calculator form.

     

    What I am asking is; is it possible for the fee calculator form to pre-populate the value with whatever the course fee says on the course page, for example the above link Fee is £2580 but it could be anything.

     

    Thanks

     

    Rich

  • Profile Image

    Answered by sidharth_kch on April 22, 2013 at 05:54 AM

    Understood.

    When you search for a course and you get the list based on your course id. Just like your other two hyperlink there, if you could add one more hyperlink there it will solve your issue and we can pre-populate the fees textbox in your calculator form.

    I will create a sample for you later today.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 22, 2013 at 06:00 AM

    Hi Sidharth

     

    I am not that clear on what you mean by this.

    We plan on having a 'Launch fee calculator' link next to the 'Fees' row, for example where it says '£2580 View more information' here: http://www.bedford.ac.uk/our_courses.aspx?id=119131&mode=P

  • Profile Image

    Answered by sidharth_kch on April 22, 2013 at 06:14 AM

     

    When you add the "Launch fee calculator" hyperlink is it going to be done programatically? Can you programatically change some text in the hyperlink? 

    If you see your other link "Register for alerts" the hyperlink has some value like code=xxxx. If you can do something like that for your fee calculator, we can pre-populate your fees in textbox.

    Please download this code: http://pastie.org/7696733

    When you run it in your browser add this next to your filename in address bar "?courseFee=200" It should be something like this : 

    file:///C:/Users/Sidharth/Downloads/FOLDER_NAME/YOUR_FILE_NAME.html?courseFee=200

    www.jotform.com/YOUR_FILE_NAME.html?courseFee=200

    This will pre-populate your form's textbox with value you pass in the address bar. (200 can be changed to any number)

     

    Hope this helps.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 22, 2013 at 06:48 AM

    Hi Sidharth

    That's a great help, thanks. I understand you now and this should be possible.

    I have another query; is there any code that can be used to just display the Course Fee and the Course Fee after 50% as just text, instead of it displaying in a text box as it does now?

    Thanks

    Rich

  • Profile Image

    Answered by RHemery on April 22, 2013 at 06:48 AM

    And for it to display '£' before the number; e.g. £200

  • Profile Image

    Answered by sidharth_kch on April 22, 2013 at 08:44 AM

    @RHemery

    That's possible. Let me work on that and send you the updated code later today.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 22, 2013 at 09:05 AM

    Thanks as always!

  • Profile Image

    Answered by RHemery on April 23, 2013 at 11:47 AM

    Hi Sidharth

    I've tried working out some of my problems but have ran into trouble.

    I am now hiding the 'Course Fee' first input box as we don't want this being displayed. I've also managed to put a £ sign before the input box - but not sure how to get the £ sign inside the input box?

     

    As well as the 50% off calculation, I am now adding a 100% off calculation and a 0% off calculation.

    I've tried editing your JavaScript but it's not working if I have more than 1 calculation?

     

    Please see my source code located at:

    http://www.studiohem.com/feecalc/jotform.html?courseFee=2000

     

    Thanks

  • Profile Image

    Answered by sidharth_kch on April 23, 2013 at 12:03 PM

    @RHemery

    Sorry for the delay. I will send you the updated code later today. I will remove the textboxes and add £ sign before the amount.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 23, 2013 at 12:06 PM

    No worries Sidharth.

    If you look at the form I uploaded http://www.studiohem.com/feecalc/jotform.html?courseFee=2000 you can see I'm having problems with the calculations.

    As well as the 50% off calculation, I now have a 100% off calculation and 0% off calculation, but I can't get both the 50% and 0% off to work if they're both there.

    You'll be able to see from the code.

    Thanks

    Rich

  • Profile Image

    Answered by RHemery on April 24, 2013 at 07:09 AM

    Hi Sidharth

    Would you be able to look at this problem today for me?

    Thanks

    Rich

  • Profile Image

    Answered by RHemery on April 24, 2013 at 07:17 AM

    Hi Sidharth

    I have just solved the calculation problems.

    Therefore there is just 1 issue now. Is it possible to have the £ sign in the text box before the Fee?

    Thanks

  • Profile Image

    Answered by sidharth_kch on April 24, 2013 at 07:19 AM

    @RHemery

    Sorry just came back to work. 

    Please send us your updated code and i will make the changes for you.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 24, 2013 at 07:27 AM

    Hi Sidarth

    No worries.

    The updated code is available at:

    http://www.studiohem.com/feecalc/test.html?courseFee=2000

     

    The only thing I want to happen is...

    When it displays the fee calculation I want it to just display text rather than displaying the fee in an input box.

     

    Thanks

    Rich

     

  • Profile Image

    Answered by sidharth_kch on April 24, 2013 at 07:50 AM

    @RHemery

    Okay i will implement the changes and send you the updated code in a while now.

    Thanks,

    Sidharth

  • Profile Image

    Answered by sidharth_kch on April 24, 2013 at 08:48 AM

    @RHemery

    Here is the updated code: http://pastie.org/7708621

    Please let me know if this is okay.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 24, 2013 at 09:14 AM

    Hi Sidharth

    That's perfect.

    Thanks so much for your help.

    Rich

  • Profile Image

    Answered by sidharth_kch on April 24, 2013 at 09:24 AM

    @RHemery

    You are welcome. 

    Should you have any questions please feel free to contact us.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 24, 2013 at 10:56 AM

    Hi Sidharth

    Sorry - I'm back and need help!

    We have several calculators, but they all have the same rules so I'm not sure why it's not working - it's the same code, the questions are just different.

     

    http://www.studiohem.com/feecalc/part-time-level4.htm?courseFee=2000

     

    If you click 'Me' 'Yes' 'Yes' you will get the message to appear but no Fee appears?

     

    Can you check my source code please.

     

    Thanks

  • Profile Image

    Answered by sidharth_kch on April 24, 2013 at 10:58 AM

    @RHemery

    Okay i will check that. Is that okay if i get back to you on this little late? How urgently you need this?

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 24, 2013 at 11:02 AM

    Hi

    It's not urgent - tomorrow is fine.

    I'm really new at JavaScript and I'm 100% sure it would only take someone like you <5 mins to see where I'm going wrong though.

    Thanks

  • Profile Image

    Answered by sidharth_kch on April 24, 2013 at 11:04 AM

    @RHemery

    Little late - I meant 1-2 hrs :)

    I will check it and get back to you ASAP.

    Many thanks

  • Profile Image

    Answered by sidharth_kch on April 24, 2013 at 02:39 PM

    @RHemery

    Looks like you are getting into version issue.

    The current code you have uploaded has only ONE calculation. Please have a look at the javascript calculation.

        function calculate() {

            var courseFee = document.forms["form_31053420670947"]["input_26"].value;

            var courseDiscountedFee = (courseFee / 1);

            document.forms["form_31053420670947"]["input_28"].value = "£" + courseDiscountedFee;

        }

     

    Code which i sent you last has two calculations. Please check.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 24, 2013 at 03:46 PM

    Hi Sidharth

    I have edited the code to have two calculations but it's still not working.

    Please see updated source code at http://www.studiohem.com/feecalc/part-time-level4.htm?courseFee=2000

  • Profile Image
    JotForm Support

    Answered by EltonCris on April 24, 2013 at 04:16 PM

    @RHemery

    My colleague will get back to you with this. I have sent him a PM to make it sure he'll never missed this.

    Thanks!

  • Profile Image

    Answered by sidharth_kch on April 25, 2013 at 04:50 AM

    @RHemery

    Looks like the condition itself is not working. Lets do this: instead of putting effort in finding out the issue, lets re-create it. The code which i sent you yesterday has two conditions and works fine, correct?

    So let me know what other conditions you have and i will add them in my code and send it to you.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 25, 2013 at 04:55 AM

    Hi Sidharth

    It is strange as the conditions are exactly the same - the calculation code is the same on both webpages but one works and the other doesn't!

     

    This is the webpage that works: http://www.studiohem.com/feecalc/part-time-level2.htm?courseFee=2000

     

    This is the new webpage which has the same code and the conditions (one that is 100% of the fee, and one that is 50% of the fee) but no fee is displayed;

    http://www.studiohem.com/feecalc/part-time-level4.htm?courseFee=2000

  • Profile Image

    Answered by sidharth_kch on April 25, 2013 at 05:06 AM

    OKay. Let me have a check on the code of both the pages.

    Will get back to you on this.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on April 25, 2013 at 06:38 AM

    Thanks Sidharth. Hopefully it's something simple/easy.

  • Profile Image

    Answered by RHemery on April 25, 2013 at 10:52 AM

    Were you able to look at this yet Sidharth?

    Thanks

  • Profile Image

    Answered by sidharth_kch on April 26, 2013 at 09:08 AM

    @RHemery

    Sorry for delayed response on this.

    I checked both the code and not sure why its is not working for you. Can you please clone the form for Level 2 and let me know the form ID.

    Also explain me the conditions which you have in your form and i will do rest of your work. Its better to come up with a new code then debugging the HTML/JS issue.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on May 08, 2013 at 06:49 AM

    Hi Sidharth

    I've been on holiday.

    Are you still available to help me with this?

    Thanks

    Rich

  • Profile Image

    Answered by sidharth_kch on May 08, 2013 at 07:05 AM

    Hi Rich,

    Yes, i am available for you. Not an issue at all.

    I may have to recollect everything. Let me check your code and get back to you on this.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on May 08, 2013 at 07:09 AM

    Hi, thanks.

    I'm sure it's a very easy fix but I don't know what!

    http://www.studiohem.com/feecalc/part-time-level2.htm?courseFee=2000 works perfectly.

     

    http://www.studiohem.com/feecalc/part-time-level4.htm?courseFee=2000 doesn't work - where a fee should display it is blank.

     

    You can see in the <script> it's exactly the same code:

     

    //input_26
      //input_27
      function calculate() {
      var courseFee = document.forms["form_31085970187965"]["input_26"].value;
      var courseDiscountedFee = (courseFee / 2);
      document.forms["form_31085970187965"]["input_27"].value = "£" + courseDiscountedFee;
     
      //input_28
      var courseFee = document.forms["form_31085970187965"]["input_26"].value;
      var courseDiscountedFee = (courseFee / 1);
      document.forms["form_31085970187965"]["input_28"].value = "£" + courseDiscountedFee;
      }
     

     

    It must be something to do with the form fields themselves?

     

    Thanks

  • Profile Image

    Answered by sidharth_kch on May 08, 2013 at 08:02 AM

    Yes it should be a minir issue. 

    I will have a check and get back to you. Is it okay if you get the updated code by today evening?

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on May 08, 2013 at 08:04 AM

    Hi Sidharth

    That would be fine.

    Thanks a lot.

  • Profile Image

    Answered by sidharth_kch on May 08, 2013 at 08:20 AM

    You are welcome.

    Thanks,

    Sidharth

  • Profile Image

    Answered by sidharth_kch on May 09, 2013 at 06:37 AM

    @RHemery

    I did some work yesterday but couldn't complete. I am sure i should be able to complete it today and send you the updated code.

    Thanks,

    Sidharth

  • Profile Image

    Answered by RHemery on May 09, 2013 at 06:39 AM

    Thanks

  • Profile Image

    Answered by sidharth_kch on May 09, 2013 at 06:48 AM

    I know i am late on this but was tied up yesterday.

    Thanks,

    Sidharth

  • Profile Image

    Answered by BedfordCollege on May 10, 2013 at 04:11 AM

    Hi Sidharth

    I think I have solved this - it looks like a onclick="calculate();" was missing from the first form field question.

  • Profile Image

    Answered by sidharth_kch on May 10, 2013 at 04:33 AM

    @BedfordCollege

    Great!

    Were you able to test it on your form? 

    Thanks,

    Sidharth

  • Profile Image

    Answered by sidharth_kch on May 10, 2013 at 04:38 AM

    @BedfordCollege

    I believe there were some issues with the conditions as well.

    In Level4.html "Me" >> "Yes" >> "No" >> "No" >> "No" - condition doesn't work. 

    Let us know if it works for you.

    Thanks,

    Sidharth