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

    Min set for donations

    Asked by maxboost on March 29, 2012 at 09:00 PM

    For donations setting, is their a way to set a min set price and cant got below it?

  • Profile Image
    JotForm Support

    Answered by idarktech on March 29, 2012 at 11:37 PM

    Hi there,

    Yes, but you need to use your form's full source code in order to achieved that. After downloading your form source code, open the .html file and try to apply this js code just above the </body> tag.

     

    <script type="text/javascript">

      document.getElementById('input_18_donation').onchange = function(){

          if(this.value < 25){

    alert("Please enter more than $25 in this box. Thanks");

    return false;

          }

    }

    </script>

    Result: http://idarktech.com/jotform/limit_donation.html

    Hope this helps. Thanks.

  • Profile Image
    JotForm Support

    Answered by liyam on March 29, 2012 at 11:50 PM

    Here's an alternative solution, maxboost.  You can use idarktech's suggestion on getting the source code but use this script instead.

    Insert this javascript code within your head tag:

    <script>
    function checkForInvalid(obj) {
         var x=document.forms["form_20535705821146"]["q18_donationpaypal[price]"].value;
         if (x < 25)
           {
           alert("Please set amount to at least 25");
           return false;
           }
    }
    </script>

    Then, in your form tag, add this attribute:

    onsubmit="return checkForInvalid(this)"

    So it will look something like this: <form class="jotform-form" action="http://submit.jotform.us/submit/20535705821146/" method="post" name="form_20535705821146" id="20535705821146" accept-charset="utf-8" onsubmit="return checkForInvalid(this)">

    You can test the form in action from this link:

  • Profile Image

    Answered by maxboost on April 24, 2012 at 07:44 PM

    first one works, unitl they place a " 0 ", i'll try the 2nd tomorrow