Expand my Community achievements bar.

How to check if a field is hidden or disabled?

Avatar

Former Community Member

I have implemented a progress bar, however, it counts all the fields in the form including hidden and disabled fields as well. I need to figure out how to check whether a field is hidden or disabled, and not count them for the progress bar. Please help!

2 Replies

Avatar

Former Community Member

I assume that you are using a for loop to get all of the fields ......once you have a field you can check the presence properrty and only count it if the presence is set to visible.

Hope that helps

Paul

Avatar

Level 6

Try this (javascript):

if (field.presence == 'visible' && field.access == 'open') {

     include in count...

}