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

    I need to add a flat fee of $5 to my Purchase Order. How do I prepopulate an amount?

    Asked by aerwso on January 21, 2013 at 09:33 PM
  • Profile Image
    JotForm Support

    Answered by Welvin on January 22, 2013 at 03:40 AM

    Hi,

    Do you mean, a flat $5 fee for one category? Let say to this form: http://www.jotform.com/30197451615251, a flat $5 fee for Novice & Jeunes / Kids?

    Please let me know if I misunderstood your question.

    Thanks

  • Profile Image

    Answered by aerwso on January 22, 2013 at 08:05 AM

    The form is a registration for a horse show, and there is a fee for paperwork added at the end. It is not for each category, but for the entire form.

  • Profile Image
    JotForm Support

    Answered by jonathan on January 22, 2013 at 10:00 AM

    @aerwso

    If I understand it correctly, you want to have at least a mandatory amount of $5 within the total.

    Is something similar to this demo form, is what you are after? In this demo, a 1 dozen cupcakes is always selected in the items/products.

    In the demo, it requires using the form's source code, so that additional code function can be injected. If you view the demo form's html source, you will see the javascripts code used at the bottom part.

    Please inform us if this have relevance to what you need.

    Thanks.

  • Profile Image

    Answered by aerwso on January 22, 2013 at 12:07 PM

    That is what I wanted. How do I inject the java script into the source code?

    Thanks

  • Profile Image
    JotForm Support

    Answered by idarktech on January 22, 2013 at 12:26 PM

    Hi,

    As per mentioned by my colleague, you can inject the script that's seen on his demo (page source). Here's how:

    1. First, get your form source code. Follow this guide: How to get your Form Source Code

    2. Add the following script at the most bottom part of your form source code.

     

    <script type="text/javascript">

    (function () {

        var cupcakes12 = document.getElementById("input_14_1008");

        cupcakes12.checked = true;

        $("payment_total").update("5.00");

        // Prevents users from unchecking box

        cupcakes12.onclick = function () {

            cupcakes12.checked = true;

            return false;

        };

    })();

    </script>

    Note that this code only applies to a single product of your form which is the 7 Présentation au licou poney pas & trot / Showmanship walk & trot pony . If you want something else, just let us know here so we can assist you further. Thanks!