AnsweredAssumed Answered

Disabling vs Hiding Fields on Specific Conditions

Question asked by raykennedy on Sep 9, 2015
Latest reply on Sep 9, 2015 by raykennedy

I would like to have a field or a couple of fields disabled and prevent user input based on conditions of another value from a field. I know I can hide the fields using the hide object attribute in inspector but I don't want them to completely disappear, just prevent user input. I know you can do this by removing the browse mode in the inspector on this but I want this to be dependent on some other conditions. Did not see anything that I could use to script the fields browse state. It would even be nice if I could create a style change on them so they appeared to be disabled but still showed their placement on the screen and value with them grayed out.

 

Here is my thoughts on how I would handle this. Just wanted to see if there is another way that is more efficient. This is just a simplified condition for illustrating what I am attempting to do.

 

Field-A is the one want to hide if x = y;

Field-B is the one that will show when Field-A is hidden in order to mimic a disabled Field-A
Field-B could simply be calculated to take the value of A and I would just change the style of this object to give an inactive appearence and remove the browse mode from it in the inspector.


# On the Field-A Ojbect using hide object attribute

IF [ x = y]

hide Field-A

END IF

 

# On the Field-B Ojbect using hide object attribute

IF [ x ≠ y]

hide Field-B

END IF

 

Any thoughts on best way to handle this.

Outcomes