Skip to main content
Participant
August 16, 2022
Question

How to edit text in a text field that is prefilled from a drop down selection

  • August 16, 2022
  • 3 replies
  • 915 views

I currently have a drop down menu (attorney name) with various selections. Each selection has a specific export value which is then prefilled into a text field (law firm). I have allowed users to enter custom text in the drop down field if their selection is not one of the options. The issue is, whatever is entered as the custom texts automatically transfers to the text field (law firm). I would like both of these fields to be editable.

 

The text field has a custom calculation script of:

event.value = this.getField("attorney name").valueAsString;

    This topic has been closed for replies.

    3 replies

    try67
    Community Expert
    Community Expert
    August 17, 2022

    Remove that code and add the following as the Validation script of "attorney name" :

    this.getField("law firm").value = event.value;

    Inspiring
    August 17, 2022

    This will not show export value in text field as OP wanted.

    try67
    Community Expert
    Community Expert
    August 17, 2022

    Then use this:

     

     

    var v = "";
    for (var i=0; i<event.target.numItems; i++) {
    	if (event.target.getItemAt(i, false)==event.value) {
    		v = event.target.getItemAt(i, true);
    	}
    }
    this.getField("law firm").value = v;

     

    Bernd Alheit
    Community Expert
    Community Expert
    August 17, 2022

    Don't use a calculation script for this.

    John T Smith
    Community Expert
    Community Expert
    August 16, 2022

    When you post a question you always need to tell the Adobe program you are using
    There are MANY programs in a full subscription, plus other non-subscription programs
    Please post the exact name of the Adobe program you use so a Moderator may move this message to that forum

    adjbir86Author
    Participant
    August 16, 2022

    My apologies- Adobe Acrobat Standard 2017