2 Replies Latest reply on Aug 31, 2017 9:08 AM by graphpro

    Forms in Acrobat


      I'm creating a form within Acrobat Pro 9 and need assistance in a few areas. The form is for my wedding videography business. I've created the form which has a calculating table to calculate the total cost of the production.



      I offer 3 Packages (Bronze, Silver and Gold). Each Package has a radio button and I want only 1 of the buttons select at a time. How do I do that? Is it better to use a radio button or a checkbox?



      Once a button is selected, I want the Name of the Package and the Price of that Package to auto fill in the table.



      If the Mic'd Groome radio button is selected I would like to auto-fill the price in the table.


      Please provide detailed instructions. I'm limited on programming skills. I'm guessing some of this will be if/then statements. You tell me though.


      I've provided a screen capture as well as notes that more clearly illustrate my objective.



      Thank You,


        • 1. Re: Forms in Acrobat
          Karl Heinz Kremer Adobe Community Professional

          #1: It does not matter: You can either use a radio button group, which will handle this automatically, or you can use checkboxes, but all checkboxes need to share the same name, but have different export values (let's call this a checkbox group). The only difference is that in a checkbox group, you can deselect the selected item by clicking it again, a radio button group does not allow you to do that. You can have the same appearance for either one by changing the Check Box Style.


          #2 You do this with a custom calculation script of the filed that should display the name. Something like this should work (assuming that you actually use the package name as the export value for your radio buttons or check boxes):


          event.value = this.getField("PackageType").value;


          If you don't use the correct name, you need to lookup your name:event


          var pkg = this.getField("PackageType").value;
          var pkgName = "";
          if (pkg == "Option 1") 
              pkgName = "Bronze Package";
          else if (pkg == "Option 2")
             pkgName = "Silver Package";
          else if (pkg == "Option 3")
            pkgName = "Gold Package";
          event.value = pkgName;


          #3 You would use a similar approach as for #2is


          You are in programming territory here, regardless of how much experience you already have with Acrobat forms. This requires that you know how to deal with JavaScript, and unless you are wiling to learn, there is nothing we can do to make this easy on you. If you are willing to learn, take the time to work through a good JavaScript resource. This eBook is pretty good: Beginning JavaScript for Adobe Acrobat


          If you are stuck with a non-Acrobat introduction to JavaScript, take a look here: Learning to Program JavaScript for Adobe Acrobat - KHKonsulting LLC

          • 2. Re: Forms in Acrobat
            graphpro Level 1

            You've been very helpful Karl. Here is where I'm at. (see screen capture below)

            I am able to select the Package (and only one "YEAH"). The text from the Package Selection auto populates in the table.


            1. I would like to auto populate the Package Price in the table.

            2. For Additional Audio checkbox (if selected) I'd like to auto populate the $175 in the table.

            3. Last, in the quantities for Add DVDs and Videography the quantity is calculated and present in the table. However, it's not linked to the checkbox. So, I could have an amount even though the checkbox isn't checked.


            Everything else is working and all calculations are perfect.


            From reading your email. I read the Java Script info. It speaks of assigning an action to the field but it didn't go into detail unless I buy the book. Is there another resource that would be free?


            I'm certain that #1 and #2 are a JavaScript Action assigned to each individual text field. What would the equation look like? I have no idea how to approach #3.


            Thank you again for all of your help!