Copy link to clipboard
Copied
Hi, I'm creating a form in Acrobat DC, I have a field (Combo Box) that has the following options:
Delivery
Pickup
Shipping
What I want to do is that when you select Delivery the background of the combo box changes to Red, if I select the Pickup option the background of the combo box changes to Green and if I choose Shipping it changes to Purple.
Somebody could help me?
Copy link to clipboard
Copied
An easy way to do this is to add a custom validation script like this
switch(event.value)
{
case "Delivery":
event.target.fillColor = color.magenta;
break;
case "Pickup":
event.target.fillColor = color.red;
break;
}
Keep in mind that "event.value" is the display value, not the export value of the item.
Copy link to clipboard
Copied
Just make sure you disable the Fields Highlighting option in the application to see the changes, as it overrides the fill color of the fields.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now