How to do an if then statement on a PDF form

I'm doing an if then statement on a PDF form.

The field is a field A * B = C.  If C < 10 then C = 10, of another C = A * B

How can I write the Adobe Pro is on a PDF form?  I went into properties, the calculated field and nothing I've tried works.

Each field is a separate object, so if you have 3 fields such as 'A', 'B' and 'C' are a single object has a unique value. Each field must be consulted individually, you should get the value in field "A" in a statement, the value of the field 'B' in another statement.

var C = this.getField ('A') .value * this.getField("B").value;

If (C)< 10="" )="" event.value="">

else event.value = C;

You can see more clearly with code like:

var A = this.getField ('A') .value; the value of a field;

var B = this.getField ('B') .value; the value of field B;

var C = A * B; the field value has multiplied by the value of the field B;

If (C)< 10="" )="">

Event.Value = 10; the value is 10 when produced less than 10;

} else {[]}

Event.Value = C; another value is the product;

}

Tags: Acrobat

Similar Questions

  • How can I put If/Then logic in a PDF form?

    I hope it will be very easy for this group - I'm doing a form, and he needs a logic in it. Talk to me as if you are talking to a 5 years, I really struggle with programming that is not in Excel.

    Anyway, the gist of this is that I have a drop-down list. It is called "Contact". I have an another text box named 'Validator '. Depending on your selection in 'Contact', I need a different output in 'Validator '.

    So if the customer is 'Customer initiated the transaction in person', then validator must be "signature customer match." If the customer is 'Customer sent by e-mail or fax the instructions' validator there "have colleague fill in Section III.

    How can I do this?

    Thank you!

    Probably the way easiest to implement is to set the export value of each item in the drop-down list in the expression that you want to appear in the text field. Then calculate it, tab of the Properties dialog box field for the text field the following custom calculation script:

    Calculation script customized for text field for Validator

    Event.Value = getField("Contact").valueAsString;

  • How did you uncheck an option button in a PDF form fillable so that no presets do exist on the form?

    I've converted a document to PDF to fill with radio buttons.  In an article, one of the buttons is selected on the design, form and I can't understand how to erase it.  When the form is opened by a user, a single button (let's call it A box) is already filled.  A user can select another button, and disappears from the box A selection.  But I do not want the boxes checked when the user gets the form.  I tried to remove the radio and add a new button, but the selection is displayed in the new button as well.  Any ideas?

    In Acrobat 11 you would select: Tools > forms > more options forms > clear form

    Acrobat 9: form > clear form

  • If/Then statement to date null in Acrobat DC

    I work in Acrobat DC, I have a document which is 6 pages long, the first page is in English, the other in Spanish.

    I have two date fields, one is named AssessmentDate and the other is LongAssessDate. AssessmentDate displays the date in English in mm/dd/yy format on the first page.

    The LongAssessDate field converts the date in the field of the AssessmentDate in a Spanish format. For example if the Valuation Date
    24/05/15 then the date is converted to this format = 24 Mayo of 2015.

    Here is my code:

    oField var = this.getField ("AssessmentDate");

    oDateObject = util.scand ("mm/dd/yy", oField.valueAsString);

    Event.Value = util.printd ("date (es) {DD ' of 'MMMM' to ' YYYY}", oDateObject, true);

    What I found is, if the user does not have a date in the AssessmentDate field (they leave empty), the current date watch in the
    Field of LongAssessDate.

    I think I need an if/then statement for the LongAssessDate field. If the value of AssessmentDate is null or empty, then the LongAssessDate field must be null/empty, but don't know how to proceed. Any help is greatly appreciated.

    Thank you, Jamie

    This should work:

    var sDate = this.getField("AssessmentDate").valueAsString;

    If (sDate) {}

    oDateObject = util.scand ("mm/dd/yy", sDate);

    Event.Value = util.printd ("date (es) {DD ' of 'MMMM' to ' YYYY}", oDateObject, true);

    } else {}

    Event.Value = "";

    }

  • New on Adobe need help with an if then statement

    Hi, I really like what ADOBE Pro 9 can do with forms and neat and everything is included.

    I'm having a problem trying to understand an if then statement for one of my forms and how to make it executable.

    Here is what I have

    I.          Cigna Medical                                           

                (10)       single                                     $  44.00

                (11)       Employee & Child (ren)              $  82.00          

                (12)       Employee & Spouse                 $  99.00                      

                (13)       Family                                     $125.00                      

                (14)       Decline Coverage                         $0.00          Choice: _        Amount: $_

    An employee will be choice an optiopn 10-14 and but that number of choices. After I am about to fill with this number.

    For instnace, if an employee takes option 11, choice: 11 and amount: $ 44.00

    I put the options in a menu drop-down. The drop down menu is titled CignaMedical and Amount_1 title for amount: $_ and I made a text box.  I put this code: if (this.getField("CignaMedical").value == '10') {}
    Amount_1 = 44.00} tab calculation of properties for the Amount_1 of text box on the custom calculation script tab.

    Any help is greatly appreciate

    Yes, you can use an if-else if construction. Something like that (I got the first part because we reuse it):

    CignaMedical = this.getField("CignaMedical").value;

    If (CignaMedical == '10') {}

    44.00 = Event.Value;

    } Else if (CignaMedical == "11") {}

    Event.Value = 82.00;

    } Else if (CignaMedical == '12') {}

    99.00 = Event.Value;

    }

    etc.

  • If/then statement

    I am designing a form that has 2 columns and I am looking for a script to fill a column based on data in the other.  Specifically, if classes has, B, C, D are entered in the column on the left, then the right column filled with 3 hours of credit.

    I took a fairly simple if/then statement... Found one in the help section of my software, plugged, named fields properly in the object palette and in the script.  No go.

    Book Terry JT not useful and my computer is not versed in Java.

    Or, maybe I'm doing it too hard and FormCalc would be the right choice?

    Thank you!

    Hi Milly,.

    You didn't say what else is in the grade or the opportunities that lay is A +, B-, etc. AND they are in a table row. I suppose they are in a table. I think on a drop-down list for the grade box. That said, this might work for a drop-down list box or a text field containing the grade (depending on how you have the menu drop-down set up) or this script is changed for a drop-down list containing the digital item values in the 'Connection' tab easily. It lends itself to the computer GPA (if it is an ultimate goal).

    Grade Credit
    A 3
    C 3
    F 0
    A 3

    The script is quite easy.

    Make sure you place this on the calculate of the "credit" field event AND formCalc is the language:

    ////////////////////////////

    If (rank< "f")     ="">

    $ = 3

    on the other

    $ = 0

    endif

    ////////////////////////////

    If there is + or - grades, you could use

    ////////////////////////////

    If (Substr (grade, 1, 1)<  "f")     ="">

    $ = 3

    on the other

    $ = 0

    endif

    ////////////////////////////

    La: Substr(grade,1,1) from the 1st letter of the slope and uses for comparison

    Replace with the name of your field of rank for the "rank" above and you should be good to go.

    Good luck

    Stephen

  • If - then statements (k)

    Honestly, I don't know how to write any PHP, but I don't know how to create a PHP website in Dreamweaver because DW wrote all the PHP for me.

    I think that I now need to get out a bit of Dreamweaver. What I would do is:
    If the variable width = 800, so I want to show a specific hidden layer.
    If the variable height = 800, so I want to show a specific hidden layer.

    I could do that in a second in ActionScript, but I have no idea how to go about this in Dreamweaver.

    How would one write an If - then statement?

    Don't forget, all this PHP code that creates DW is like hieroglyphics to me.

    Thank you
    -Kirk

    xparrot_dude wrote:
    > I'm not having much luck. I don't know where to put the if-then you have written or if
    > the $width is a standard PHP type thing or if it is a variable.

    It is a variable. In PHP all variables begin with a dollar sign.

    > Here's what I tried:
    >
    ><>
    > If ($width == 800) {}
    {$show > visible =}
    > {else}
    $show > = hidden
    > } ?>

    You would not assign a string to a variable in ActionScript without using
    quotes. It goes the same for PHP. In ActionScript, the semicolon at the end
    a statement is optional (but recommended recommended). In PHP, there
    mandatory.


    <>
    If ($width == 800) {}
    $show = 'visible' ;}
    else {}
    $show = 'hidden ';
    } ?>

    > I then put the $show variable in my css, like this:
    > #HorizontalPhoto {}
    > position: absolute;
    > left: 53px;
    > top: 159px;
    > width: 317px;
    > height: 172px;
    > z - index: 1;
    > visibility: $show;
    > }

    The only thing that can go in CSS is CSS. If you want to use PHP, you
    must surround yourself with PHP tags and use echo or print to the output of the
    the value of the variable.

    visibility: ;

    > Please keep in mind that I've never written ANY PHP. So I don't know if I
    > need the tags or even where I can and can not put code.

    Everyone is a beginner at one point, but you will get better help if you
    make an effort to begin to learn some PHP basics yourself. A good place
    to start is with the official PHP tutorial:

    http://docs.php.net/manual/en/getting-started.php

    You will also find the PHP language useful reference, especially if
    you are already familiar with ActionScript. The two languages share many
    in common:

    http://docs.php.net/manual/en/langref.php

    --
    Adobe Community Expert David Powers
    Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How can I remove a United States billing address that I am in the United Kingdom

    How can I remove a United States billing address that I am in the United Kingdom

    You now define US as your billing address? If you do: change your iTunes Store country or region - Apple Support

  • If I have floating values such as 6.3 6.7, 6.9, 7.1, 7.2, how can I write a case statement to handle this

    How can I write a case statement if I want a case for x< 1.5;  ="" a="" case="" for="" 1.5=""><= x=""><= 3.7; ="" case="" for ="" 3.7="">< x="">< 7.2.....etc.  ="" my="" input="" is="" a="" floating="">

    Thank you.

    You don't seem to have set rules on inclusion, but I often use the function in the range and Coerce in these cases.

  • How to enable display of the State of the network in the system tray?

    How to enable display of the State of the network in the system tray?

    Hi barta75,

    Thanks for posting in the Microsoft Community. It seems that you have a problem with the display of the status of the network (on the system tray) on the computer. This can be very frustrating for you, and I appreciate the efforts you have put in. Let us work together as a team to get this number fixed.

    We start with a few questions-

    (1) you have the network on the system tray icon?

    (2) have you made changes on the computer?

    I would like more information about the issue.

    Method 1-

    I wish that you hover the mouse over the network icon and check the status of the network.

    Method 2-

    I would have you look at the article-

    Networking

    http://Windows.Microsoft.com/en-in/Windows7/products/features/networking

    Notifications and Notification area (Windows)

    http://msdn.Microsoft.com/en-us/library/Windows/desktop/ee330740 (v = vs. 85) .aspx

    In addition, see the article-

    In Windows network connection issues

    http://support.Microsoft.com/kb/313242#top

    We know if you need help. We will be happy to help you.

    Thank you.

  • How can I stop and then resume when you use the magnetic Lasso tool?

    CS4 on Mac. I have some fairly complicated selections to make and the magnetic lasso tool seems a good choice. However: How can I stop and then resume when in use? For example, I would like to zoom, start by dragging along the edge, then stop, move the image to a different area of it is in the middle of my screen, then pick up again where I left.

    Hi MarieMeyer,

    You can press the SPACEBAR shortcut to activate the hand tool temporarily once you are finished with the selection on a part of the image.

    Then, move the image with the key space key and let it continue with the selection by using the magnetic lasso tool.

    You can use the SHIFT key to add to the selection by using the magnetic lasso tool.

    Kind regards

    Claes

  • How to change my country United States State in Myanmar?

    How to change my country United States State in Myanmar?

    Change the country associated with your Adobe ID

  • Hello. Editor of newbie here. If I split a video file into two clips in Premiere Pro and you want then save each one as a different file while exporting to the encoder, how to make sure that they are registered in the form of two different with different

    Hello. Editor of newbie here. If I split a video file into two clips in Premiere Pro and you want then save each one as a different file while exporting to the encoder, how to make sure that they are registered in the form of two different files with different after encoding names?

    Located in and out on a section and that export brands.

    .. .Rinse and repeat for the other section.

    Name each section and where it is exported to separately... and as you wish

  • If then statements

    Greetings,

    I use Adobe Acrobat Pro XI.  I have a drop down list which has the value 'Yes' or 'No' I would like to create an If Then statement to return specific values in another field of text based on the value of the drop-down list box.  Specifically, if the value of the 'drop-down list' = 'no', then the value of the "textfield2' will be 'n/a '.  If the value of the drop-down list is 'Yes', then the value of the "textfield2" remains empty if the applicant can enter data into "textfield2.

    Hope it makes sense.  Thank you in advance.

    Steve

    Use this code in the script validation custom from the drop-down list:

    If (event.value == "No") this.getField("textfield2").value = "n/a";

    else this.getField("textfield2").value = "";

    Make sure that check the option to validate the value selected from the drop-down list immediately (under Properties - Options).

  • If then statement help

    Thanks in advance for your help. I work on a PDF form and has difficulty with a logical statement (If Then). Then the field (TotalEligibleServiceCatchup) should be the least of the three amounts: TotalElectiveSalaryDeferralMinusYearsOfServiceCatchup, LifetimeMinusCatchupAmount, or $3,000. In other words, if the Total salary deferral less years of Service catch-up is like $3,000 and life less amount of catch-up is greater than $3,000; the value of the calculated field is $ 3,000. If one or both of the first two values are less than $3,000, the calculated field is the least of these values.

    Thanks in advance for your help.

    In this case, you can use this code as the custom of your domain calculation script:

    var v1 = +this.getField("TotalElectiveSalaryDeferralMinusYearsOfServiceCatchup").valueAsString;
    var v2 = +this.getField("LifetimeMinusCatchupAmount").valueAsString;
    event.value = Math.min(3000, v1, v2);
    

Maybe you are looking for