Skip to main content
Participant
September 9, 2023
Question

cod java forms function if

  • September 9, 2023
  • 4 replies
  • 907 views

I need help cod java.

In a .pdf form I have 3 fields A, B and C. The value of field C must be:

C=A if A>B;

C=B if B>A;

C=A if A=B

    This topic has been closed for replies.

    4 replies

    try67
    Community Expert
    Community Expert
    September 9, 2023
    var A = Number(this.getField("A").valueAsString);
    var B = Number(this.getField("B").valueAsString);
    event.value  = Math.max(A, B);

     

     

    Participant
    September 10, 2023

    Thank you ! the code works!

    kglad
    Community Expert
    Community Expert
    September 9, 2023

    in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

    p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post if it helps you get responses.



    <"moved from using the community">
    Participant
    September 9, 2023

    i need javascripts code in an adobe acrobat dc form

    kglad
    Community Expert
    Community Expert
    September 9, 2023

    is this a javascript acrobat question?