Expand my Community achievements bar.

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

Highlight script does not work correctly

Avatar

Level 9

I am trying to get the yellow filled rectangle to become visible behind the numeric field when the numeric field is greater than "1". Can anyone help see why my script is not working?

https://acrobat.com/#d=MJObRvA*l9tbFmrlHcMHUA

Thanks,

-Don

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi Don,

The reason your code is not working is because it is not actually being run. This is due to you placing the code on the exit event of the text field itself and this would require the user to move to that field and then leave the field and then you code runs.

I would recommend that you change you form to add this code to the end of the code that your 'addAttachment' button runs and then the form functions as I would expect.

if (NumberOfAttachments.rawValue > 1) {

  RectangleYellow.presence = "visible";

}

Hope this helps

Malcolm

View solution in original post

2 Replies

Avatar

Correct answer by
Level 5

Hi Don,

The reason your code is not working is because it is not actually being run. This is due to you placing the code on the exit event of the text field itself and this would require the user to move to that field and then leave the field and then you code runs.

I would recommend that you change you form to add this code to the end of the code that your 'addAttachment' button runs and then the form functions as I would expect.

if (NumberOfAttachments.rawValue > 1) {

  RectangleYellow.presence = "visible";

}

Hope this helps

Malcolm