5 Replies Latest reply on Apr 17, 2013 7:58 PM by Adobify

    Conditional text in Acrobat Form

    seb400 Level 1

      I'm new to Acrobat forms and scripting (I hope that it's conditional text that I'm after), and would like some help please, I'm sure that what I want will be pretty basic.

      I'm creating a form and would like to be able to have each selection option from a 'List Box' populate another field with specific text when chosen eg

       

      'List box Selection' 01 - display the text 'red' in other field.

      'List box Selection' 02 - display the text 'blue' in other field.

      'List box Selection' 03 - display the text 'yellow' in other field.

       

      MTIA

       

      Steve

        • 1. Re: Conditional text in Acrobat Form
          George_Johnson MVP & Adobe Community Professional

          For the other fields that you want the color name to appear in, do they need to be editable by the user, or will they be set to read-only and are just for displaying the color name? Do you currently have export values specified for the combo box items?

          • 2. Re: Conditional text in Acrobat Form
            seb400 Level 1

            Hi George

            No the fields do not need to be editable - I'm working on a time sheet, my example was for ease of explanation.

            The drop down list shows the operation (Des, Scan, Imp, Proof), each of which is assigned a different identification code.

             

            Des - C101

            Scan - E103

             

            etc, etc

             

            I don't believe that I've got export values - as I don't know what they are, or where I would specify them?

             

            Steve

            • 3. Re: Conditional text in Acrobat Form
              George_Johnson MVP & Adobe Community Professional

              For each item in the combo box, set the export value to the corresponding identification code as shown below:

               

              combo1.png

               

              Also select the Commit selected value immediately. Then set up a custom Calculate script for the text field that is:

               

              // Custom Calculate script for text field

              event.value = getField("cb1").valueAsString;

               

              Replace "cb1" with the name of the combo box.

              • 4. Re: Conditional text in Acrobat Form
                seb400 Level 1

                Thanks George, that works a treat.

                 

                I disabled the 'Commit selected value immediately' as it's quite easy to select the wrong 'item' and would need changing.


                I also now realise that I'll have to redesign my form as some of the 'Items' have multiple answers, but given your help I'm sure I can find a way around that

                 

                Steve

                • 5. Re: Conditional text in Acrobat Form
                  Adobify

                  I know this is an old post but seems to be one in a million.

                   

                  I applied the java script but the problem is that I cannot add any text to the field. If I do it gets reset back to what is in the export field. I have to be able to edit the field as in add or subtract text at will.

                   

                  Is there any way to do this?