Try to make a drop-down list automatically calculate another field, but it is only caclulating a menu drop-down

I am currently using Acrobat to create a form to fill out. Basically I want the selection in the drop down from the provinces to calculate the taxes of the SubShip field. I have 3 fields of text labeled GST, HST and PST and the selection must fill each box respectively. However, with the code that I use now, it is calculation only 13% of the SubShip field any province is selected, and it is only showing in the box of HST. Here is my code, and I have no idea where I'm wrong.

Can someone please?

var sNewSel = event.value;

Switch (sNewSel) {}

case "Ontario":

this.getField("HST").value = (this.getField (subtotal) .value +)

this.getField ("Shipping") .value) * this.getField("0.13").value;

this.getField("PST").value = '0 ';

this.getField("GST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "Prince Edward Island":

this.getField ("SubShip") .value = this.getField("HST").value * this.getField("0.14").value;

this.getField("PST").value = '0 ';

this.getField("GST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "Alberta":

this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

this.getField("HST").value = '0 ';

this.getField("PST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case 'British Columbia':

this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

this.getField ("SubShip") .value = this.getField("PST").value * this.getField("0.07").value;

this.getField("HST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "Manitoba":

this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

this.getField ("SubShip") .value = this.getField("PST").value * this.getField("0.08").value;

this.getField("HST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "New Brunswick":

this.getField ("SubShip") .value = this.getField("HST").value * this.getField("0.13").value;

this.getField("GST").value = '0 ';

this.getField("PST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "Nova Scotia":

this.getField ("SubShip") .value = this.getField("HST").value * this.getField("0.15").value;

this.getField("GST").value = '0 ';

this.getField("PST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "Nunavut":

this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

this.getField("HST").value = '0 ';

this.getField("PST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "Quebec":

this.getField ("SubShip") .value = this.getField("PST").value * this.getField("0.9975").value;

this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

this.getField("HST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "Saskatchewan":

this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

this.getField ("SubShip") .value = this.getField("PST").value * this.getField("0.05").value;

this.getField("HST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "Yukon":

this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

this.getField("HST").value = '0 ';

this.getField("PST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "Newfoundland":

this.getField ("SubShip") .value = this.getField("HST").value * this.getField("0.13").value;

this.getField("GST").value = '0 ';

this.getField("PST").value = '0 ';

break;

}

var sNewSel = event.value;

Switch (sNewSel) {}

case "The Northwest Territories":

this.getField ("SubShip") .value = this.getField("GST").value * this.getField("0.05").value;

this.getField("HST").value = '0 ';

this.getField("PST").value = '0 ';

break;

}

Your link does not have access to the folder.

You error means there is an error in the name of the field used in the script. You must check very carefully the spelling and capitalization of the name of the field.

Tags: Acrobat

Similar Questions

  • Hi I have Lightroom 5.7.1 and try to make the panorama.  Photo/Edit in watch upward but somehow "Merge to Panorama in Photoshop" is grayed out.  How can I make it work?  How can I make panorama to 5.7.1?

    Hi I have Lightroom 5.7.1 and try to make the panorama.  Photo/Edit in watch upward but somehow "Merge to Panorama in Photoshop" is grayed out.  How can I make it work?  How can I make panorama to 5.7.1?  Can anyone help?

    Seriously Teddy5555, this isn't a problem with Lightroom.  If PhotoShop is not installed on your computer, then you cannot directly photos to edit in PhotoShop, nor can you merge to Panorama in PhotoShop.  If it is not installed, you must install it to make it work.

    6 LR and LR CC 2015 have the ability to merge with a Panorama in LR itself as shown below, but I don't remember if it was available in LR 5.

  • How to get a selection of drop-down list to complete another field with nothing

    Hello

    I have a drop down menu that fills another field according to what is selected (as shown here where Admin mistakes fills the next field with 6735-10-01).

    Capture-1.JPG

    However, there are 3 items in the drop-down list that I don't want to fill in the other with (basically, it must be empty during one of these 3 elements are selected, in contrast to how it returns zero in the example below). I don't know what to put in for the values to make it white.

    Capture-2.JPG

    Please notify.

    Kind regards

    ZeroZone

    I don't know what your code looks like or where it is but you will need to add a conditional statement, such as:

    If (DropDown.rawValue == "0" | ") DropDown.rawValue == "1" / * | "" etc, etc, * /)

    TextField.rawValue = null;

    on the other

    TextField.rawValue = DropDown.rawValue;

    Kyle

  • How can I use a selection of menu items drop down to change another field value?

    Hi guys! I work in a medical care center and I need to create a PDF file that must contain certain fields in the form. I managed to create the largest part of these areas, but I'm stuck in a menu drop-down. The drop down menu contains the names of 83 employees. Each employee has a unique code of 6 numbers. I wish these codes to appear automatically in another field based on the selection of a brand in the drop-down menu field. Is there a way to do this without scripts? I'm not a programmer and have no programming capabilities. I work in Adobe Acrobat Pro DC!

    Forms.jpg

    You can do this by using a very simple script.

    Basically what you need to do is define the export value of each item in your drop-down menu for the corresponding code to this person and then use this code as the custom text field calculation script (replace 'Employee' in the code with the actual field name, of course):

    Event.Value = this.getField("Employee").valueAsString;

    PS. You must also enable the option validate the selected value immediately in the drop-down list field. You'll find it under properties, Options tab.

  • 2 operating systems: Windows 7 makes all folders and files on another partition (Windows XP) read-only! What now?

    2 operating systems: Windows XP and Windows 7

    Windows 7 is to make all the folders and files on another partition (Windows XP) read-only!

    Once, I opened a file from "My Documents" from XP in Windows 7.

    But when I Wen back to Windows XP.

    But while starting up, I got a lot of error messages:

    Access denied!

    When I am gone to Windows 7 yet once I noticed that all records on the other partition where unalterable.

    But after I tried to void that lookt again to see if she had cancelled it.

    But he remains unalterable reports!

    I have lookt on Google and Bing, but could not find someone with the same problem!

    Now it works!

    I used these 10 steps to solve the problem!

    10 STEPS TO GET FULL CONTROL ON a FILE / FOLDER / PARTITION (Microsoft Windows Xp):

    1. press F8

    2. select Safe Mode

    3. log in with an administrator account

    3. go into the properties of the folder / partition / file that you cannot access

    4. Select security and then advanced

    5. in 'owners' define yourself as an owner (if it is not defined)

    6. click on 'Ok '.

    7 configure yourself: make sure you clickt on the box "Total control" (allow)

    8. click 'OK' and then 'apply '.

    9 reboot

    10. the test (if it still does not, try again a few times)

    ____________________________________________________________________________

    And then it worked!

  • Some way to make a drop-down list with dressing

    I is it possible to make a drop-down list contains a long sentence and when you select the sentence, he trained actually phrase to encapsulate in a multi-line text box?  I seem to be able to enter a fairly long series of words in the drop-down list, but when you make a selection of the text encapsulates not and the right edge of the field cost overruns.  If this can be done is a way of pre-existing reference somewhere else comments hidden in the shape and align them on the field with the selection list?

    I think that this is a limitation in the LC Designer. However, you get the sentence on mouse hover.

  • Multiple drop-down lists using SetFieldValues mixture fields.

    I have 2 drop-down lists (Dropdown1 & Dropdown2). They are identicle except for their domain names and of their first element option.  When the user chooses an option, I want a predetermined value to be sent to a field of text (FeeAmountRow1 & FeeAmountRow2).  Similar to a purchase order using a drop down.

    By trial and error what I know is that somewhere my scripts are cross.  When I try the shape as the script below, the two drop-down lists send values in the same text instead of their respective field.  Removal of code in each menu drop-down makes the job of other fines.

    I made each of them 'value selected to validate immediately '.  I added the following Scripts of striking personalized to their format.

    Dropdown1 - text if field resets the default drop-down list option is selected, this feature works very well.

    if (event.willCommit) {
        if (event.value == "Select Day 1 Service Type") this.resetForm(["FeeAmountRow1"]);
        else SetFieldValues(event.value);
    }
    

    Dropdown2

    if (event.willCommit) {
        if (event.value == "Select Day 2 Service Type") this.resetForm(["FeeAmountRow2"]);
        else SetFieldValues(event.value);
    }
    

    I use the following script:

    // Dropdown option items data 
    var saData = {
        "Speaking Engagement": {
            fee: "1360.00"
        },
            "Field Ride Consultation": {
            fee: "1700.00"
        },
            "Speaker's Training": {
            fee: "1500.00"
        }
    };
    
    function SetFieldValues(saName) {
        // Populate fields with values
        this.getField("FeeAmountRow1").value = saData[saName].fee;
        this.getField("FeeAmountRow2").value = saData[saName].fee;
    }
    

    In the SetFieldValues function, it is exactly what the code does. He defined two different fields to the same value. Create a separate for each field feature individual rtext, or pass the name of the field as a parameter. For example:

    function SetFieldValues(f_name, saName) {
        // Populate fields with values
        this.getField(f_name).value = saData[saName].fee;
    }

    New script from typo to dropdown2
    if (event.willCommit) {
        if (event.value == "Select Day 2 Service Type") this.resetForm(["FeeAmountRow2"]);
        else SetFieldValues("FeeAmountRow2", event.value);
    }

  • Make a drop down field selectable, but password protect text

    Hi, we have created a form with several drop-down menus. One of the drop-down menus contains the prices. We have been asked to make this drop switchable - but lock the text, so only the password holders can change the price.

    Is this possible, and if so, how are you?

    Thank you in advance!

    No, it isn't. With the help of player you cannot select an item in a drop-down list,

    change (except if you have enabled the option in the properties of the field that)

    allows the user to enter custom values).

  • I transferred X 1 pro overall to another PC, but opening I get the message "serial number you provided is valid but calling it a product was not found on this computer", the drop-down list of products responding to the does not contain the ProX1 op

    I transferred X 1 pro overall to another PC, but opening I get the message "serial number you provided is valid but calling it a product was not found on this computer", the drop-down list of products responding to the does not contain the option ProX1.

    Hi Carl,

    It seems that you have installed Acrobat XI pro as an upgrade and an upgrade you will need a serial number for a product older Acrobat X, etc. 9:

    See, error: "this serial number is not for a product calling it" | Adobe Creative Suite

    Also, I checked with your Adobe ID on the forums and I can only locate XI of Acrobat pro upgrade recorded, please check if you have registered an earlier version of Acrobat on some another email to get this serial number.

    Let us know if that helps.

    Kind regards

    Sandrine Bani

  • How to make an item in the menu drop-down open another field when selected?

    For example; I'm doing a drop down menu and one of the options is 'other '.

    I want to 'Others' to open top/to highlight another field when its elected officials. is this possible?

    Pls help

    Thanks in advance.

    Yes, it can be done using a simple, written script in JavaScript.

    Basically, it would be something like this (as a script validation custom from the drop-down list):

    "this.getField("Others").display = (event.value =="Others)? Display.visible: display.hidden;

    A script more complex can also be used to clear the value of the 'other' field, set its fill color, etc..

  • When I try to make changes, I get the 'licence to administrator need to do', but there is no space to enter the password.

    Original title: when I try to make any changes, I get a 'need admin permission to do' but when this window to type in password admin come up there is no place to type the password... also cannot add a new user because of this problem

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • You have problems with programs
    • When error I have try to make all the changes that I get the 'need to permission admin to do', but when this window appears the box type the admin password is not there...
    • Recent changes to your computer
    • What you have already tried to solve the problem
    Hello
     
    1. when the question is is produced?
    2. did you of recent changes made to your computer before the problem?
    3. is it a standard or a user administrator account?
     
    Follow these steps and check if the problem persists.
     
    Step 1:
     
    You can try setting the default Administrator account and check if you can solve the problem.
    It is a security feature in Vista that will let you do it from any other account except the administrator account.
    a. click the Start button
    (b) in the Start Menu, click all programs followed accessories
    c. in the menu accessories, right-click on command line option
    d. in the drop-down menu that appears, click on the "Run as Administrator" option
    e. If you have the User Account Control (UAC) enabled, you will be asked for permission before the opening of the command line. You simply press the button continue if you are the administrator or insert password etc.
    f. in the command prompt window, type the command net user administrator / Active: Yes and press ENTER.
    g. close the elevated command prompt.
    h. log (in the Start Menu) and you will see your new administrator integrated next to your current account.
    i. click the photo icon display built-in Administrator account and connect to it.
     
    Step 2:
     
    If the problem happened not so long ago, you can perform a System Restore to the point that your computer was working fine.
     
    Aziz Nadeem - Microsoft Support

    [If this post was helpful, please click the button "Vote as helpful" (green triangle). If it can help solve your problem, click on the button 'Propose as answer' or 'mark as answer '. [By proposing / marking a post as answer or useful you help others find the answer more quickly.]

  • Try to make a variable with loop for

    Try to retrieve an instance of movieClip in my library and set it on stage and clickable menu do, (list drop-down/dropup)).
    Can someone help me with what I'm doing wrong?

    var MenuItem1:Array = new Array ("text1", "text2", "Text3", "text4");
    CreateM (MenuItem1.length);
    function CreateM(Menu1:Number):void
    {

    for (var i: Number = 0; i < MenuItem1.length; i ++)
    {

    var cela ["M1" + i]: TextField = new TextField();
    var cela ["M2" + i]: takki = new takki();
    This ["M2" + i] there = this ["M2" + i] there-(i*50) + (stage.stageHeight - this ["M2" + i] .height);
    This ["M1" + i] .text = MenuItem1 [i];
    This ["M1" + i] there = this ["M1" + i] there-(i*20) + (stage.stageHeight - this ["M1" + i] .height);

    addChild (this ["M2" + i]);
    addChild (this ["M1" + i]);

    This ["m2" + i] .addEventListener (MouseEvent.MOUSE_OVER, clicking);
    }
    }

    function clicking(event:MouseEvent):void

    {

    trace ("I am clicking on the button" & & this ["M2"]);

    }

    Try something like this:

    var MenuItem1:Array = new Array ("text1", "text2", "Text3", "text4");
    CreateM (MenuItem1.length);

    function CreateM(Menu1:Number):void
    {
    for (var i: Number = 0; i
    This ["M1" + i] = new TextField();
    This ["M2" + i] = new takki();
    This ["M2" + i] there = this ["M2" + i] there-(i*50) + (stage.stageHeight - this ["M2" + i] .height);
    This ["M1" + i] .text = MenuItem1 [i];
       
    This ["M1" + i] there = this ["M1" + i] there-(i*20) + (stage.stageHeight - this ["M1" + i] .height);
       
    addChild (this ["M2" + i]);
    addChild (this ["M1" + i]);

    This ["m2" + i] .addEventListener (MouseEvent.Click, clicking);
    }
    }

    function clicking(event:MouseEvent):void {}
    trace ("I am clicking on the button" & event.target.name);
    }

    Remember that you have to work with the positioning and the TextFields overlap takkis, that the click is possible only in a minor fraction of the takkis.

  • whenever I try to make my computer in Hibernate, or sleep, he starts running instead of doing what I select

    Original title: why isn't my Vista system down correctly?

    Last month, I noticed that whenever I try to make my computer in Hibernate, or sleep, it will restart instead of doing what I select.  Several times, it will reboot, sometimes in Mode without failure.  This never used before, and it's really disturbing.  What is happening, and how can I fix this problem so that my computer will sleep or Hibernate when I choose these options?  Thank you.

    Hi Ako1979,

    (1) remember you to make changes prior to this problem?

    (2) you get an error message?

    (3) using a laptop or a desktop computer?  Please provide the serial number and model


    Method 1:
    change the power plan and then check if the problem persists. To do this, follow the steps mentioned in the link below

    Change, create, or delete a power plan (scheme)
    http://Windows.Microsoft.com/en-us/Windows-Vista/change-create-or-delete-a-power-plan-scheme


    Method 2:
    to turn off the power on the USB (Universal Serial Bus) hub and then check if it makes a difference

    (a) right click on my computer, click Properties and click the Hardware tab, then click Device Manager.

    (b) double-click to expand, USB Bus controllers right click on USB root hub, and then click Properties.

    (c) click the power management tab.

    (d) clear the allow the computer to turn off this device to save power check box, and then click OK.

    Method 3: Download and install all the available Windows updates

    Install Windows updates
    http://Windows.Microsoft.com/en-us/Windows-Vista/install-Windows-updates

    For more information, please visit the links below

    Change what happens when you close your mobile PC
    http://Windows.Microsoft.com/en-us/Windows-Vista/change-what-happens-when-you-close-your-mobile-PC-lid

    Change the function of the power button on your laptop
    http://Windows.Microsoft.com/en-us/Windows-Vista/change-the-function-of-the-power-button-on-a-mobile-PC

  • Whenever I try to create a text box indesign automatically for me and place the text in the middle.

    Whenever I try to create a text box indesign automatically for me and place the text in the middle. I can get the text moves if I play with the object ' menu ' detected block options, but it does every time. "

    Hello, welcome to the forum of InDesign. I'm a different Steve.

    What version of InDesign are you using? What operating system do you use?

    Tell us exactly how you create your text box (frame).

    The easiest way is to choose the tool of Type (T). Click and drag an image where you want to go.

    But, if you place the text to another program like Microsoft Word, click file > Place. Select the file and click Open. Drag-and-drop placement of text cursor to position it on the page.

  • My Muse freezes when I try to import once in the list

    My Muse freezes when I try to import once in the list. Wait is nothing more... I can't work and I have a lot of work to it please help!

    I saw a post about the same problem, but for windows forum. A certain file was to be renamed, but I'm on Mac and uncertain how to proceed, as a search for the AdobeMuse file did not find anything.

    Using Mac OSX Yosemite, Muse CC was last updated.

    Thanks a bunch

    Hello

    You can solve this problem by renaming the folder 'com.adobe.AdobeMuseCC.2014.3' to 'com.adobe.AdobeMuseCC.2014.3_old '.

    You can find the file in the following location

    Finder > go > go to folder > type ~/library/preferences > press return

    This will take you to the preferences folder, and you can easily locate the folder.

    (Please make sure you leave Muse while that rename the folder)

    Concerning

    Vivek

Maybe you are looking for