Skip to main content
Participant
December 5, 2023
Question

Drop down selection change color of text box

  • December 5, 2023
  • 1 reply
  • 356 views

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.

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
December 5, 2023

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;