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.

  • Profile Image

    Require an item be purchased with authorize.net checkout form

    Asked by themenpen on February 12, 2012 at 10:30 PM

    I am using the checkboxes to tally items for checking out using the authorize.net integration. I want to remove the checkbox from my item and make it assumed that they are buying it and not able to uncheck. I have tested both the "hidden" input options which then doesn't include the item so that doesn't work, and the disabled attribute option forces it checked and likewise doesn't tally and calculate properly. Ideally I would like to not even show the checkbox and let the customer only select quantity, assuming one or more units. 

    Page URL:

    checkbox checkboxes hidden quantity
  • Profile Image
    JotForm Support

    Answered by fxr on February 13, 2012 at 05:48 AM

    The following *should* work but I would if at all possible put through a couple of test submissions to make sure I haven't overlooked anything. 


    1. Add the following CSS to hide 'Men Pen Concealer Stick $17.95 USD' from the form:

    #input_16_1029, #input_16_1029+label {display:none; }

    I put that in between the two style tags on your webpage (before where the form code starts)


    Then 2) just add the following javascript after the closing <form> tag to update that 'Total' field with the selected product options that you want the form to default to:


     <script type="text/javascript">




      function doTotal ()


      var pens = $('input_16_quantity_1029_0')[$('input_16_quantity_1029_0').selectedIndex].text;

      var USDpens = pens * 17.95 ;

      if ($('input_16_1022').checked==true) { USDpens = USDpens + 1.79; }

      if ($('input_16_1023').checked==true) { USDpens = USDpens + 5.75; }

      if ($('input_16_1024').checked==true) { USDpens = USDpens + 19.95; }

      if ($('input_16_1025').checked==true) { USDpens = USDpens + 3.95; }

      if ($('input_16_1026').checked==true) { USDpens = USDpens + 10.75; }







    You can see an example of your form with these changes in place here


    I believe that should work fine, but I havent been able to test it once controls passes to authorize.net, to make sure the form values get transfered over OK. 

  • Profile Image

    Answered by themenpen on February 13, 2012 at 08:36 AM

    works perfect Thanks!