Skip to main content
Participant
December 30, 2024
Question

If / Then statement based on another field's value (ADOBE ACROBAT PRO FORMS)

  • December 30, 2024
  • 2 replies
  • 379 views
Hi all; I've been struggling trying to add an If/then statement, based on the value selected on a drop-down; list within the form. I have created the Java-script for this, and it seems that this (script) is correct; however, it doesn't display the required info. I really appreciate if someone can give me a hint or a definite solution.... Thanks much! Jackie. Here's part of the code I used: var INICIO = this.getField("INICIO").valueAsString; if (INICIO=="LUNES-16-DICIEMBRE-2024") FIN = "MARTES-31-DICIEMBRE-2024"; else if (INICIO=="MIERCOLES-1-ENERO-2025") FIN = "MIERCOLES-15-ENERO-2025"; else if (INICIO=="JUEVES-16-ENERO-2025") FIN = "VIERNES-31-ENERO-2025"; else if (INICIO=="SABADO-1-FEBRERO-2025") FIN = "SABADO-15-FEBRERO-2025"; else if (INICIO=="DOMINGO-16-FEBRERO-2025") FIN = "SABADO-15-FEBRERO-2025"; else if (INICIO=="SABADO-1-MARZO-2025") FIN = "SABADO-15-MARZO-2025"; else if (INICIO=="DOMINGO-16-MARZO-2025") FIN = "LUNES-31-MARZO-2025"; else if (INICIO=="MARTES-1-ABRIL-2025") FIN = "MARTES-15-ABRIL-2025"; //and so on...
    This topic has been closed for replies.

    2 replies

    try67
    Community Expert
    Community Expert
    December 30, 2024

    Assuming this is a calculation script, you need to add this line to the end of it:

    event.value = FIN;

    Participant
    December 30, 2024
    Thanks!!
    kglad
    Community Expert
    Community Expert
    December 30, 2024

    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 (like this one has already been moved) if it helps you get responses.



    <"moved from using the community">