Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
21

Drop down selection change color of text box

New Here ,
Dec 05, 2023 Dec 05, 2023

I have a drop-down menu with 5 selections.  Below I have 5 separate text boxes. I would like to make it so that if you select #1 in the drop-down it will turn text box 1 yellow. If you select #2 in the drop-down menu, it turns text box #2  blue and box 1 goes back to transparent.

TOPICS
Create PDFs , Edit and convert PDFs , PDF , PDF forms
279
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 05, 2023 Dec 05, 2023
LATEST

Use this as 'Validation' script of dropdown field (change field names and dropdown choices to your actual field name and choices):

this.getField("Text1").fillColor = event.value == "Choice1" ? color.yellow : color.transparent;
this.getField("Text2").fillColor = event.value == "Choice2" ? color.blue : color.transparent;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines