lauri457
Kilo Patron

Glideform has at least these two methods in workspaces to check if a field is visible: isVisible and isFieldVisible. I recall isVisible gives false negatives (at least on classic ui) if the visibility is toggled by setting a non-visible empty field as mandatory vs explicitly setting display as true.

const gform = querySelectorShadowDom.querySelectorAllDeep('sn-form-data-connected')[0]?.nowRecordFormBlob?.gForm //use g_form when calling from client script
gform.setDisplay("description", true)
console.log(gform.getFieldNames().filter(n => gform.isVisible(n)))
gform.setDisplay("description", false)
console.log(gform.getFieldNames().filter(n => gform.isFieldVisible(n)))

 as above:

lauri457_0-1770091100988.png