How To Find Element IDs to Use With JavaScript

Important Update to Custom Scripting

SurveyGizmo's CustomScript Action now supports the LUA programming language. Visit our NEW Lua Scripting Resources!

Legacy Custom Scripting Language Deprecation Plans 

  1. New accounts (created after October 29, 2018) will only have the option to use Lua in scripts.
  2. As of October 29, 2018 Custom Scripting Actions will default to Lua as the scripting type in the Custom Scripting Action for accounts created before this date. You will be able to switch to the Legacy Custom Scripting; though we highly encourage using Lua.
  3. In the long term, Legacy Custom Scripting Actions will be switched to read-only. The exact date on this is to be determined; we will send notifications well ahead of time.

If you're using JavaScript you'll eventually need to find out where a element ID is. This tutorial will walk you through locating your element IDs. 


Each browser will have a different way to find your element ID. In this tutorial I will be using Firefox but here is some information on the different browser tools. 

  • Firefox - Right click on any element and select Inspect Element from the menu.
  • Google Chrome - Right click in on any element and select Inspect Element from the menu.
  • Safari - Safari requires you to turn Inspect Element on. From your Safari menu bar click Safari > Preferences then select the Advanced tab. Select: Show Develop menu in menu bar. Now right click and select Inspect Element from the menu. 

  • Opera - Right click on any element then select Inspect Element from the menu. 
  • Internet Explorer - Open the Tools menu from Internet Explorer. Select the Developer Tools option. The F12 button can be used as a shortcut. If a new window is opened select the Pin button in the right corner of the window. Ctrl+P can be used as a shortcut. This will pin the new window inside of the Internet Explorer window. Click the arrow button inside of the Developer Toolbar window at the bottom of the screen. Select which Element needs to be inspected by placing the cursor over the Element and then click on that Element. 

Finding the Element: 

Once you have located your inspect element tool, right click on the element and click Inspect Element. It will bring up the element ID. In the image below "sgE-2033346-1-2-element" is my element ID. 

Scripting and Other Custom Solutions

We’re always happy to help you debug any documented script that is used as is. That said, we do not have the resources to write scripts on demand or to debug a customized script.

If you have customization ideas that you haven't figured out how to tackle, we're happy to be a sounding board for SurveyGizmo features and functionality ideas that might meet your customization. Beyond this, you might want to consult with someone on our Programming Services Team; these folks might have the scripting chops to help you to achieve what you are looking for!