Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

An other question about required fields en color change

Avatar

Level 3

I've got 4 fields.

The client must enter a Country name in Field1

If this is "NL", than Field2, Field3 and Field4 become required.

I've done this with FormCalc

if (Field1 == "NL") then

Field2.validate.nullTest="error"

Field3.validate.nullTest="error"

Field4.validate.nullTest="error"

else

Field2.validate.nullTest="disabled"

Field3.validate.nullTest="disabled"

Field4.validate.nullTest="disabled"

endif

Now comes my problem:

When field2, field3, and field4 are requered, they have to change color (fill color red) when empty

And when they are not required, they don't have to change color

Can anyone help me with this problem?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Here is an example of script for changing the visual appearance of an object. Please note that the script in this example is JavaScript. https://acrobat.com/#d=xHziYOr8zapKWtuVhWUk0w

Hope that helps,

Niall

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi,

Here is an example of script for changing the visual appearance of an object. Please note that the script in this example is JavaScript. https://acrobat.com/#d=xHziYOr8zapKWtuVhWUk0w

Hope that helps,

Niall