Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
>Is there an API that will allow me to enumerate all the UI controls in a view
It isn't clear what you are looking for. "Controls" normally refers to form elements such as <input>, <textarea> etc on a form but these elements are on present on a view page (they display on an new or edit page). On the other hand the screenshot you posted suggests that you want to grab the essential data associated with a form editing page such as section heading text. In either case you can easily get this information using JavaScript although by different means.
The general idea is to load the page in question into a hidden <iframe> and when it loads you use jQuery's serializeArray method or the FormData API to grab a representation of the form's state as either an array or object.
https://api.jquery.com/serializeArray/
https://developer.mozilla.org/en-US/docs/Web/API/FormData
It isn't clear what you are looking for. "Controls" normally refers to form elements such as <input>, <textarea> etc on a form but these elements are on present on a view page (they display on an new or edit page). On the other hand the screenshot you posted suggests that you want to grab the essential data associated with a form editing page such as section heading text. In either case you can easily get this information using JavaScript although by different means.
The general idea is to load the page in question into a hidden <iframe> and when it loads you use jQuery's serializeArray method or the FormData API to grab a representation of the form's state as either an array or object.
https://api.jquery.com/serializeArray/
https://developer.mozilla.org/en-US/docs/Web/API/FormData