How to get names of the form elements

Document created by Gutis Champion on Jun 9, 2015
Version 1Show Document
  • View in full screen mode

Sometimes you need to get form elements names or id's to do some manipulations with the forms on the client side ( e.g. hide/disable some fields or trigger on field changes). You can easily do this by using development tools of your browser. Developer tools can be accessed particularly on any modern browser by pressing F12. This tutorial shows how to get Major Incident checkbox name by using IE developers tool

1. Press F12 and in developer menu choose DOM Explorer ()


2. Focus the mouse pointer and click on control that you want to inspect


3. Review the results



As you see the name of the Major Incident checkbox is CBX.major_incident. Now you can use javascript to do some manipulation for example to hide it you can use statement like this:

document.main_form.elements["CBX.major_incident"].style.display = 'none';