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

    How to limit the Total amount of the "Slider with Calculated Result Widget" to 100%.

    Asked by storeytellerfilms on August 12, 2016 at 03:27 AM
    Thank you for this most valuable answer, but...how do I 'hard limit' the result to 100%?
  • Profile Image
    JotForm Support

    Answered by Chriistian on August 12, 2016 at 03:42 AM

    I assume you are referring to this form: https://www.jotform.com/form/62238004734854? You want to limit the Total Percentage of the widget to 100%.

    You can use the Calculation Formula below to limit the Total Percentage to 100%.

    (#1 + #2 + #3 +#4 + #5 + #6 + #7 + #8 + #9  + #10) / 10

    Here's a cloned version of your form so you can see it in action: https://form.jotform.com/62241343505951 

    Please let us know if you need further assistance.
    Regards.

  • Profile Image

    Answered by storeytellerfilms on August 12, 2016 at 03:57 AM
    Dearest you.
    Thank you, however..., the cloned version doesn't work. Perhaps the
    perimeter should read 100?
    I will experiment and adjust.
    Thank you millions/100.
    ...
  • Profile Image
    JotForm Support

    Answered by Chriistian on August 12, 2016 at 05:19 AM

    I checked the clone and it seems to work fine on my end. The percentage is calculated correctly. https://form.jotform.com/62241343505951 

    Do you have any further requirements for the widget? Please let us know and we will be glad to assist you further. Regards.

  • Profile Image

    Answered by storeytellerfilms on August 12, 2016 at 07:00 AM

    Christian et al,

    Thank you, indeed, for your attentions, but still the math doesn't 'add up'

    DETAIL:
    The form features 10 separate listings, a schedule from which the user must select a finite percentage (%) of a whole budget (100%) spend.

    The total spend must be represented as 'Total Percentage of Budget Spent '100%',
    Currently the 'result' attributes to 1.00%, not 100%, The total value does not 'hard limit' either.


    As an example, if the user indicates they have spent 66% of budget on Consumables, and (a faulty) 66% on Permanent Acquisitions, the 'Total Percentage of Budget Spens' is 1.32%
    This is not a suitable math.

    Perhaps I could ask you to look again?
    Many thanks.

  • Profile Image

    Answered by storeytellerfilms on August 12, 2016 at 07:02 AM

    Christian,

    One more question:
    If the background of the form is BLACK (as I need it to be), how can I change FONT COLOUR to either WHITE or RED?
  • Profile Image
    JotForm Support

    Answered by Chriistian on August 12, 2016 at 09:41 AM

    Hi,

    In the Calculation Formula, please change the denominator to 10. Please see steps below.

     

     

    In the scenario you have given above, will the total below be the correct result?

    Regarding your concern about the form's background, I have moved it to another thread to assist you better. Please see the thread here.

     

  • Profile Image

    Answered by storeytellerfilms on August 12, 2016 at 05:08 PM

    Christiian,

    If you were to consider the Total Budget as a Glass of water, and in this case there are ten straws.
    each straw could syphon off a particular amount according to the thirst of the user/consumer.
    Each straw, in theory, could 'drink' 100%.

    In the first use-case, 100% of the Total Budget could be consumed by 'Fines/Permits/Licenses, resulting in 100% Budget Spend and that would be fine.

    However, if Fines/Permits/Licenses consumed only 25% of the total budget, (leaving 75% of budget available) then that 75% remainder can only be availble amongst the other sliders/variables.

    Currently I cannot do that.

    I have bracketed the equation, adjusted the demoninators and the math still doesn't flow.
    ALSO, the numeric at the slider end now reads up to '10' instead of '100' as I need.

    I do apologise, the need for clarity in this component is quite exacting.

  • Profile Image
    JotForm Support

    Answered by BDAVID on August 12, 2016 at 07:16 PM

    I doubt there is a formula to accomplish what you need with the widget. I think that requires custom programming to discount what has been taken from the 100% total by one of the option, and leave the remaining percentage to the rest of the options.

    Unfortunately, we don't have any other widget to accomplish what you need. If you want to, we could request one to our widgets team, however, there isn't an estimated time-frame for an implementation.

  • Profile Image

    Answered by storeytellerfilms on August 12, 2016 at 07:19 PM

    BDavid,

     

    Well, thats a disappointing result, but at least I know its not from lack of trying.

    Thank you.

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 12:44 AM

    I just wanted to throw a thought out there. I haven't tested it, and it works in my head, but what if you were to put a hidden field in there that automatically deducted 1000 from the equation to give you your final percentage?

    Edit:

    I cloned your form and added this in to the configuration of the widget. You can play with it, but it does what you want. 

    Calculator

        min = 0 

        default = -1000

        max = 0

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 12:51 AM

    iwbrb07,

     

    I like the idea you propose, it seems sound (in theory), but how to express it? My coding skills are stone-age. Can you offer pointers/suggestions? Thank you.

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 12:52 AM

    Edit:

    I cloned your form and added this in to the configuration of the widget. You can play with it, but it does what you want. 

     

    Calculator

        min = 0 

        default = -1000

        max = 0

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 12:53 AM

    iwbrb07

     

    Should I add this at the head or tail of the form field?

     

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 12:56 AM

    Add that code into the configuration of the widget (form field). Click on the wand and you will see your configuration, add it at the bottom of the list.

     

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 12:58 AM

    iwbrb07,

     

    I did, and it does not achieve the goal. :-(

     

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 12:59 AM

    I do not know css very well, so maybe support could help, but this could probably be hidden with css so it doesn't appear to the user.

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 01:00 AM

    Here is the form i cloned, it works for me oops, I accidentally put in your forms address , not the one I cloned. here is the right one https://form.jotform.com/62250582456961

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 01:03 AM

    I have removed the calculator, reset the calculation to

    (#1 + #2 + #3 +#4 + #5 + #6 + #7 + #8 + #9 + #10) / 1

     

    now, if only I could hard limit the total to 100!

    Could an expression such as '>100' be the one I need?

     

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 01:07 AM

    apparently not :0(

    What coding language is this made in? sorry I am so noob!

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 01:09 AM

    iwbrb07,

    thank you for updated form, but, alas this version permits each slider to be only 10% of the rule,
    not (potentially) 100% of the rule.

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 01:15 AM

    I edited that address, before you sent the message. Here is MY VERSION https://form.jotform.com/62250582456961

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 01:22 AM

    iwbrb07,

     

    Nope, still only allows 10% of total budget per slider, not a potential 100%.

    Imagine that the user spent 90% of budget on consumables

    5% of budget on food

    and 5% of budget on wardrobe, hair & makeup,

    Somehow that result must total 100%!

     

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 01:32 AM

    Change the calculation formula string to

     

     (#1 + #2 + #3 +#4 + #5 + #6 + #7 + #8 + #9  + #10) / 1

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 01:33 AM

    but this does allow them to calculate over budget, which might be a good thing to know.

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 01:34 AM

    iwbrb07,

     

    I have, that brings it close o right, but it still does not hard limit the ##result## to 100%

    Thank you for your help & support.

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 01:42 AM

    So this is how I set MY VERSION up:

     

    ------------------------------------

    Configuration

    ------------------------------------

     

    Travel Expenses (%)

       min = 0 

       default = 0

       max = 100

     

    Wardrobe, Hair, Make-Up (%)

        min = 0 

       default = 0

       max = 100

     

    Camera/Sound/Lighting (%)

       min = 0 

       default = 0

         max = 100

     

    Physical Effects or Special Effects (%)

        min = 0 

        default = 0

         max = 100

     

    Feeding Cast & Crew  (%)

        min = 0 

        default =0

        max = 100

     

    Professional Services/Skills  (%)

       min = 0 

        default = 0

        max = 100

       

    Talent Fees (%) 

        min = 0 

        default = 0

        max = 100

       

    Consumables (batteries etc) (%)

        min = 0 

        default = 0

        max = 100

     

    Permanent Acquisitions (%)

        min = 0 

        default = 0

         max = 100

     

    Fines/Permits/Licenses

        min = 0 

        default = 0

        max = 100

     

    Calculator

        min = 0 

        default = -1000

        max = 0

     

    -------------------------------------

    Calculation Formula

    -------------------------------------

     

    (#1 + #2 + #3 +#4 + #5 + #6 + #7 + #8 + #9  + #10) / 1

     

    -------------------------------------

    Result Text 

    -------------------------------------

     

    Total Percentage of Budget Spent ##result##%

     

    -------------------------------------

    Result Precision

    -------------------------------------

     

    0

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 01:46 AM

    iwbrb07,

    yes, we are using identical config text,

    NB The Calculator config text is useless in my version, it just sits there, numb, immobile.

    The real issue is that the ##result## is still not hard limited to 100%

  • Profile Image

    Answered by iwbrb07 on August 13, 2016 at 01:52 AM

    Im sorry i couldnt be of more help. But I don't think there would be any foul in allowing the result to go over 100% as it does. Good luck to you!

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 01:54 AM

    iwbrb07,

    Millions of thanks, you've gone above and beyond the call,

    I've tagged the result line with a warning, tis about all I can do.


    Thank you again.

  • Profile Image
    JotForm Support

    Answered by Nik_C on August 13, 2016 at 04:52 AM

    You could create a condition that will check if the total percentage is more or less than 100% and if it is not equal to 100% you could hide the submit button and show the message for total percentage needed so the users are unable to submit unless they set the total percentage to 100%. 

    I have created an example for you. 

    https://form.jotform.com/62251780115954

    Please let us know if this worked for you.

    Thank you.

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 04:59 AM

    Nic C,

     

    Gosh, thats a lovely, elegant solution. I like very very much!

    How may I obtain the expressions?

     

  • Profile Image
    JotForm Support

    Answered by Nik_C on August 13, 2016 at 06:26 AM

    You can clone my form and use it or you can create the following conditions in your form:

    To create conditions in the form builder click on the conditions button:

    You can find the conditions here:

     

    And you can follow this guide on how to setup the conditions in your form:

     

     

    The text I used for error is just a regular text control with the red font color.

    Please let us know if you need more information.

     

  • Profile Image

    Answered by storeytellerfilms on August 13, 2016 at 07:46 AM
    Superb, simply superb!
    Thank you!
    I have curly questions approaching, (multiple text fields with group &
    selective conditionals!)
    I will detail that problem with more accuracy.
    Thank you, thank you, Very appreciative and glad to have such wisdom on
    hand.
    ...
  • Profile Image
    JotForm Support

    Answered by Jim_R on August 13, 2016 at 12:01 PM

    I'm glad my colleague's workaround fits your requirement. If you have possible followup questions, please don't hesitate to create a new thread and we'll be more than happy to assist you there :)

    Enjoy your weekend!