Pdf form conditional checkboxes

Hi.
I'm building a pdf form in Acrobat 8 Professional. I want to add JavaScript to 3 checkboxes to achieve the following:
if checkbox 1 or 2 is checked, uncheck checkbox 3; and if checkbox 3 is checked uncheck both 1 and 2.
It seems straightforward, but I have not been able to find a solution either in the Acrobat guide nor online. I have no experience in Javascript other than copying and pasting, so I'm not sure I'm using the right language to search. If anyone can provide any guidance, I would greatly appreciate it.
Thanks a lot!

Well, a little bit late but thanks for this anyway. Very helpful.
I've another question related to this matter. How can I make polish this code and apply to various groups of checkboxes without creating an endless list of variables?
function Caselles()
// Get a reference to each check box 
    var f1 = getField("C1"); 
    var f2 = getField("C2"); 
    var f3 = getField("C3"); 
    var f4 = getField("C4");
    var f5 = getField("C5");
    // Uncheck c2, c3 and c4 if c1 was selected/deselected 
    if (event.target === f1) {
        f2.value = "Off"; 
        f3.value = "Off";
        f4.value = "Off";
    // Uncheck c3 and c4 and check c1 when c2 was selected/deselected 
    if (event.target === f2) {
        f1.checkThisBox(0,true);
        f3.value = "Off";
        f4.value = "Off";
    // Uncheck c4 and check c1 and c2 when c3 was selected/deselected
     if (event.target === f3) {
          f1.checkThisBox(0,true);
          f2.checkThisBox(0,true);
          f4.value = "Off";
    // Check all when c4 was selected/deselected
     if (event.target === f4) {
          f1.checkThisBox(0,true);
          f2.checkThisBox(0,true);
          f3.checkThisBox(0,true);
Thanks in advance!

Similar Messages

  • Using dynamic referencing in PDF Form with Checkboxes

    I have created a checklist that contains approx 60-70 steps. About 20 of them are to have a checkbox that fills an adjacent field with the date, and another with the user name. I have already got this functioning as a stand alone process.
    aaa = checkbox
    aaadate = field for date
    aaaname = field for name
    [code]
    function test() {
    var one = this.getField("aaa");
    var two = this.getField("aaadate");
    if (one.value == 'Yes') {
    if (two.value == "") {
         this.getField("aaadate").value = util.printd("dd-mmm-yy",new Date());
         this.getField("aaaname").value = identity.name;
    }} else if (one.value == 'Off') {
         this.getField("aaadate").value = "";
         this.getField("aaaname").value = "";
    [/code]
    I do not want to write a piece of code for each checkbox so I am trying to figure out how to use dynamic referencing so that when i check on a checkbox, the code takes the checked checkboxes' name (aaa) and is able to determine the two other fields name by appending/concatenating (name + "date"  = aaadate)
    I have tried various methods and done tremendous research; I'm not sure if I lack the knowledge to incorporate what I've found properly, if I just have been looking in the wrong places for the wrong things. It seems like this should be possible in a PDF form...
    Please help

    You need to inject the part of the field name that changes as a variable. So your code would be something like this:
    function test(base) {
        var one = this.getField(base);
        var two = this.getField(base+"date");
        if (one.value == 'Yes') {
            if (two.value == "") {
                this.getField(base+"date").value = util.printd("dd-mmm-yy",new Date());
                this.getField(base+"name").value = identity.name;
        } else if (one.value == 'Off') {
            this.getField(base+"date").value = "";
            this.getField(base+"name").value = "";
    And you would call it like so:
    test("aaa");
    test("bbb");
    etc.

  • Problems with XML import to PDF form esp. checkboxes

    I am posting this here because it was suggested to me to do so when I posted it here:
    http://forums.adobe.com/message/5613723
    Hi,
    I work with a certain PDF form created by the US government. They recently "upgraded" the form. (N600K)
    With the old form, I would import values in an XML file, which worked fine.
    With the new form, I have encountered a problem:
    The checkboxes behave as if they are ALL one group of radio buttons, which means only one can be selected at a time.
    There are quite a few questions with checkbox answers. If I or my xml file select any one if them, the rest get cleared.
    I have contacted the US government about this, but surprisingly, they have not responded.
    If you are familiar with designing PDF forms and think you might be able to understand my problem and help fix it, i would love to hear from you!
    Please email me at gidon.ariel @ gmail.com

    Tundra Steve, it sounds like that, that all the checkboxes behave like one
    set of radio buttons. But they aren't. They are separate sets of
    checkboxes, and while some sets could behave like radio buttons
    (male/female, for example), they should really all behave like the
    checkboxes that they are, and allow any and all to be selected.
    Thanks and God Bless,
    Gidon Ariel  [email protected]
    cell 054-5665037, home 02-5354586, VoIP 845-445-1604
    Israel fax 1532-5354586,  USA fax 623-433-4874
    Maale Hever, DN Har Hebron 90420 Israel
    http://www.facebook.com/gidonariel http://bit.ly/gidon-linkedin
    "Happy are those who have discovered
    that the secret of life is to be nice to others"

  • How can I force a group of checkboxes using imported PDF forms

    how can I force a group of checkboxes when using imported PDF forms,
    My checkboxes are single fields rather than a group, the form is design using indesign?

    The PDF file format doesn't support grouping check-boxes into a multi-choice field. Because of that, FormsCentral just represents them as check boxes.
    Randy

  • Is there a way to delete one of several checkboxes from a pdf form without the leftover checkboxes automatically renumbering themselves?

    Is there a way to delete one of several checkboxes from a pdf form without the leftover checkboxes automatically renumbering themselves?
    I used LiveCycle Designer to make a pdf form with many checkboxes. When I deleted a few of the checkboxes the rest left on the form renumbered themselves. This made my JavaScript out of sync since the JavaScript checkbox numbers did NOT update automatically. I am hoping there is a preference option to not auto update. I just cannot find it,

    I believe you're using the same name for each checkbox, right?!
    If so, each checkbox has an index number which represents its position relative to the other copies in the XML tree and when you add, delete or reorder the copies the index will always be recreated because thats the way how XML works.
    There is no way to stop Designer from doing this, I'm afraid.
    To address individual objects through JavaScript you should use unique names.

  • How to delete checkbox in pdf form using adobe acrobat professional 6.

    I  am trying to modify a pdf form having a single layer. There are some checkboxes which i want to delete. I am using Adobe acrobat 6 professional. USing Advanced Editing tools -> Touchup Object Tool , i have try to delete the checkbox, it deletes all fields and tables in the form and there is only text left on the form. Any help would be appreciated. . Thanks@

    You do not use the "Object Tool" to edit forms. There should be a "Form" menu option and under this option you will have the opton "Edit form in Acrobat". This is the way one should edit/create a form in Acrobat.

  • Script for calculations using checkboxes in PDF form

    I have 7 checkboxes, at least one must be checked, but the user may select all. Each one has a value of 800, therefore selecting all seven would give a total of (800 + 800 + 800 + 800 + 800 + 800 + 800). Selecting only two: (800 + 800), etc.
    However, the last checkbox is a 50% discount for students.
    I'd like the total to have this formula:
    (CheckBox1 + CheckBox2 + CheckBox3 + CheckBox4 + CheckBox5 + CheckBox6 + CheckBox7) = x
    If CheckBox8 is selected, then x/2.
    I've done (CheckBox1 + CheckBox2 + CheckBox3 + CheckBox4 + CheckBox5 + CheckBox6 + CheckBox7) / CheckBox8
    but in this way, I only get a value if the CheckBox8 discount is selected. Not everyone will be a student.
    Excel, Access, no problem, but I'm new to javascript and pdf forms. Any suggestions?
    Isabel

    Two things about Acrobat JavaScirpt and forms you should be aware of:
    1. Check boxes and radio boxes have a string value of "Off" when there is no selection is made for the field or a field within an exclusionary group of fields, fields with the same name but different export values.
    2. One can not divide by zero and expect a reasonable answer. You will get a string returned with a value of "NaN' (Not a Number), "Infinity", or "-Infinity". Those values maybe number types but the numeric field type can not display them and reports a format error. You can check this by setting the field format to 'None'.

  • Checkboxes in pdf form

    Have a pdf form that i use with a coldfusion application.
    The form designer used boxes as psuedo checkboxes so i replaced them with the real thing since i have to set the value programmatically.  trouble is now they display "Checkbox" to the let of each check at runtime.  Nothing appears in the designer there, naturally.
    Anyone know how i can get rid of it?

    Hi,
    Try setting the caption to "none" in the Object/Layout Tab.
    Good luck,
    Niall

  • Node Conditions in PDF form

    HI All,
    Please read the question carefully before responding.
    We have a Z version of MEDRUCK_PO which the customer has asked us to change. Currently he can use a free text delivery address in Ariba which will then be passed to the PO in SAP ECC.
    The problem is that certain POs are will default to SAP delivery addresses (managed by Plant). We then have an issue where we can have two addresses on a line item. Confusing for the Vendor!
    This should be easily solved by conditioning the address at the line item. However the text-id is in another node (TEXTS) and because of this it cannot be used as a conditioning variable. The same goes for any other TEXT variables.
    Does anyone have a clever way of getting around this problem?
    Thanks in advance.
    Alistair

    It the person who filled it in probably used Preview, which corrupts PDF forms in a number of ways. To make the data visible in the fields, open the form in Acrobat, export the form data to an FDF file, and import the FDF file that you saved.

  • How to check a checkbox field value in fw9 PDF form

    Hi,
    I got a PDF given form IRS (http://www.irs.gov/pub/irs-pdf/fw9.pdf). While creating a widget to this pdf form to sign it, I merged the custum data to those PDF form fields using API setMergeFields.
    All the data fields are merged fine except the checkboxes. I tried by passing the values to the merge_fields array as 'On', '1', 'checked', 'checkbox(checked)' but no luck
    What is wrong here in checking the chexbox field in this fw9 PDF or How to check a checkbox field in a form?
    Thank you,

    Hi Simon,
    I re-added and edited the fields of fw9 form by pdf printer. While doing so, I made fields as ready only so that, the data cannot be edited in the form through the widget but will be merged the data to fields only be the code. Wherein Im using the widget only for signature but not for form filling.
    Here, Im able to merge my custom data to all fields while creating widget but not to the fields of checkboxes. The checkboxes fields which are made ready-only are not allowing me to merge the value as checked by the API.
    Please help me,
    Thanks you,

  • Preview does not sum column data in PDF forms

    Preview is way better than Acrobat for most purposes, but it has some basic limitations that just make it hard to use. for example I have to use this form that asks you to enter $ in a table, however Preview does not sum the column, it just puts a "0" in. Why doesn't Preview add? Plus, this default behaviour makes it harder to paste in my own number as there is a zero in the way. At least it would be nice if it could just remove the 0 and leave me with an editble section. Is this just the product of a badly created PDF form or, as I suspect, a limitation of Preview?

    I'm having the exact problem. I have a fillable PDF form that has many checkboxes. Saving the pdf (doesn't matter whether it's 'Save', 'Save All', or 'Save As' under the File menu) will clear/reset the checkboxes in the file.
    Anyone know of a workaround for this? Or, is Apple fixing this soon? I really don't want to get Acrobat Pro 9 (well, I don't think it's compatible with Snow Leopard yet anyway)
    If you'd like a sample PDF file to try it out, let me know.
    Thanks.

  • Questions about using a PDF form online

    I have a client who wants to create an online version of a PDF form that they are currently using. I am currently trying to explain to them that this would be best done as an HTML web form, but I may not win this argument. I have only used PDFs for printed forms (either hand-written or using form fields) so I am not familiar with any problems that converting the form for use online would entail.
    When the 'Submit' button is pressed on the form, is there a way to redirect to another web page after the data is submitted? (i.e. does the PDF have access to it's outer 'environment'?)
    Are there any security issues submitting data using the PDF form as opposed to using a standard web form? (There may be sensitive data being submitted)
    I'm not sure how they plan to handle the data that is submitted, but there are several options in the submitForm parameters - I am assuming that using the HTML option would submit the data in the same format as a web form would. Am I correct here?
    Can the PDF be prevented from being downloaded or printed? This form should only be used to submit data to their server, not as a printed form.
    Are there any other 'gotchas' that I need to look out for? Does anyone have a recommendation for a site which contains any tutorials or guidelines for using PDF forms online?

    Thanks for the information.
    Yes, I agree that there is less reason for it to be a PDF form (Actually, no real reason other than the original form already exists in PDF), but I am unfortunately in the position that my input in this project is not necessarily being considered (my company is following direct -and inconsistent- directions from the client, and I have no contact with the client to ask questions about what their actual needs are). I have been told to give the client the 'Tomato' that they are asking for, even though they are describing an 'Apple'.
    The reason this form is not meant to be printed is that we have replaced the 'Signature' fields from the original form with checkboxes that the user must check to confirm they have 'signed' the document. If they are to print/fax/whatever the document, they should use the original form, not this one. And I am still trying to explain to them that this would be better served with an HTML web form, but I fear I am losing that battle.
    I have brought up the fact that it is not 100% guaranteed that Acrobat will be available in the browser, although I can only guess that it is less than likely that anyone will not have some sort of PDF viewer available to their browser.
    I will also mention that issues may arise if the file is not submitted from within the browser.

  • Web Dynpro as Callable object in GP using PDF Forms

    Hi All,
    I somehow want to integrate a user filling out a pdf form within a Guided Procedure. So far I have created a local web dynpro DC and I want to make it a Web Dynpro Callable Object (GP Interface). The problem is, I want the user to be able to see the PDF form when filling out the form. For example, if they had a role in the portal where they can invoke the Web Dynpro application with the pdf form, then when they click submit on the pdf they invoke the guided procedure...is this possible? This is so, I can use the web dynpro to do some data validation and call some bapis to get info, then submit this all to the GP. Is this achievable? I know how to do most things, I just want to know things like when is the "execute" and "getDescription" methods called? I want my execute( com.sap.caf.eu.gp.co.api.IGPExecutionContext executionContext ) method to call a bapi also. Is that possible? How do I automate a GP process when I click submit on the pdf form?
    Thanks in advanced
    TM

    Hi,
    You can integrate a PDF control in a Web Dynpro view. Refer the following links for that:
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/dc/f1783fe3263042e10000000a114084/frameset.htm">Example of the Use of an Interactive PDF Form (SAP Library - Web Dynpro for Java)</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/60/6fc10c6748479392101e09c9e8d33a/frameset.htm">Interactive Forms in Web Dynpro for Java</a>
    Also you can create Web Dynpro Java callable object in GP by implementing the IGPWebDynproCO interface. Refer the following links for that:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50d74ada-0c01-0010-07a8-8c118d408e59">Implementing a Web Dynpro Callable Object which Implements the GP Interface</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3f07a7a-0601-0010-ebbd-b9cfb445b814">Implementing a Web Dynpro Callable Object</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/fd/afb4429027da11e10000000a155106/frameset.htm">Implementing a Web Dynpro Component</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/de/8976417f2d5558e10000000a1550b0/frameset.htm">Implementing and Exposing a Web Dynpro as a Callable Object</a>
    You can start a GP process using the public API:
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/43/fcdf77fc6510b3e10000000a11466f/frameset.htm">Starting and Terminating Processes Using the GP API (SAP Library - Creating Composite Applications)</a><a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f27e290-0201-0010-ff82-c21557572da1">Creating Interactive Forms in Web Dynpro for Java</a>
    Also you can start a GP process using Web Service:
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/44/44c59fd7c72e84e10000000a155369/frameset.htm">Starting a Process Using Web Services (SAP Library - Creating Composite Applications)</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/93/27dc108cfc407fbf6c726151840001/frameset.htm">Starting and Terminating Processes Within a Composite</a>
    Refering the above links you'll get a fairly good idea how to integrate Adobe forms in WDP and how to start GP process programitically. My suggestion for your requirement would be if always you need to start the process after the user submits the Adobe form, then consider having the Adobe form as the first step for the process. In that case you don't need to start the process programitically. Whenever the user starts filling up the Adobe form the GP process will start. You can refer <a href="/people/dipankar.saha3/blog/2007/03/02/how-to-present-your-gp-processes-to-the-end-user">this blog</a> on how to start a GP process as an iview link in portal.
    Otherwise if based on certain conditions you need to start the process then you can either use the Java API or the web service to start the process from Web Dynpro. You should have the Adobe form embedded in Web Dynpro and on submit event you can check the conditions and start the process if required.
    Thanks,
    Dipankar

  • Is it possible to designate stapling when printing a PDF form?

    I am using Adobe Lifecycle Designer (ver. 10.0.1029120306.1.870331) to set up a new report for an SAP application.  I can certainly designate duplex printing from within the form by using Form Properties and the PDF Print Options, but no stapling option can be found.  Is this possible?  Is there a way to set this up from within the PDF form?  If not within the form, what have others found to work for their environment?  We are using Xerox GPD PS printers here and they certainly offer the stapling feature.
    Thanks for any suggestions...Pat

    OK...it has been a wild ride, but between our Basis team and the Server team (which handles our printer drivers), here is what they came up with to enable this feature.  They really put in the time to figure this out.  References to PRD in this document is a reference to our production machine.  ZPMLOCL is a printer type used by our users for printing these work order forms.  A lot of effort was also given to make sure the driver on the printer supported the stapling feature (most do anymore).  This effort is to not only allow stapling, but to also eliminate the pesky banner page which can suddenly start printing with these changes.  We are using Xerox printers in our evironment.
    Steps for Basis Portion of PRD change on the - Standard Work Order Form - shop paper document
    (STMS) Transport device type ZPMHPLJ4 to PRD with Transport
    SPAD
    Change device type of printer ZPMLOCL from SAPWIN to ZPMHPLJ4.
    Click on access method tab and change access method to G: (Front End Printing with Control Tech).
    Confirm the "No device Selection at frontend" checkbox is selected.
    Hit the Save button.
    Copy  zpmhppcl5e.xdc file from AD1 to ADS, in the location below.
      4. SA38/SE38* run program RSPO0022 on PRD and Check to see if transport from step 1 moves the assignment below.
          If not create assignment the same as in the red box  below.
      5. Finally, stop and then start the XML Form Module Java Service in ADS.
    I have no other notes on this setup.  I hope this helps you in your efforts to get the stapling feature up and running on your system.

  • Need to extract PDF form answers into an XML file

    Hi Adobe gurus,we have a requirement like this. We have a Time Tracking and Project Monitoring System whose DB is a Oracle 10g R2. We want to automate our ''Meeting Minute'' processing.
    1. The project lead will write minutes into a form PDF. i.e. a PDF where people can type in information into fields and also tick check-boxes etc.  
    2. The PDF will be e-mailed to the project manager.
    3. Project manager will save the PDF in a HDD directory.
    4. Then he will run a program.
    5. Program will pickup all the PDFs in that directory one-by-one.
    6. For each PDF, the program should read the fields and get the values for the form fields and create an .XML file for it.
    7. Now, another program will read the XML files, extract the information and store those in a DB against each project lead.
    I went through the thread PDF to XML conversion, but unfortunately it has no complete solution. This problem is present for lots of people and I would be really grateful if Adobe experts can give a complete solution. In order to make it easy to answer, I have made a small questionnaire below:
    (A.) When creating a PDF form. i.e. a PDF where you can type information to questions and tick checkboxes etc., can you create the PDF with structure. i.e. for example, the field into which a user types project name should be identifiable (as a tag or something like like PROJECT_NAME), when we create an XML out of it later? Is this called creating a tagged PDF?
    (B.) Does this mean that we cannot convert an untagged PDF to XML?
    (C.) In order to convert a PDF to XML do we need a XSD or DTD? I ask this because, I some converters from the web, like this one, asks for the XSD. And this tool which converts a PDF to XML, asks for a rules set before converting the PDF. So is this necessary?? i.e. Do we have to have our own XSD and rules set, or does the PDF->XML utility convert to XML based on predefined ADOBE PDF tags??
    (D.) Do we HAVE TO use the Adobe LiveCycle ES DLLS to do this??? I ask this becuase most of the free PDF-2-XML convertes give wrong results and has no guarantee.
    (E). Can you please elaborate the process of converting PDFs to XML. Please note that we are doing this using a program (i.e. we process a batch of PDFs).
    (F.) If we use ADOBE DLLS then do we have to purchase the Adobe LiveCycle ES product??
    (G.) If we purchase Adobe LC ES then can we use the DLLs in Java, .Net??? Or is it possible to call the Adobe DLLs only using C or C++ (I read about this on the .Net)?
    (H.) Is Adobe LiveCycle ES a separate product from the Adobe SDK and Adobe PDF writer??
    Your advice would be greatly appreicated.
    Thanks in advance.
    Ravi de Silva.

    Thanks, however, I just want the user to be able to hit the Submit by E-mail button, and e-mail the form to the Manager.  I believe, that this is what this button should be able to do, except that it converts the file to .XML format.
    Still looking for help.  thanks

Maybe you are looking for