---
title: "Inspecting and Copying the Query Selector"
canonical: "https://support.appfire.com/space/SUPPORT/80878181/Inspecting%20and%20Copying%20the%20Query%20Selector"
format: markdown
---
Referencing the query selector of an element from the DOM can be complicated. Why not copy the query selector straight from the page instead?

## Instructions

1. Right-click on the element on the issue UI.
2. Click on "Inspect".
3. The DOM will automatically open up and highlight the element in the JavaScript console.
4. Select and click on the parent element.
5. Hover over "Copy", then click on "Copy selector".

> ℹ️ The query selector changes between the view and edit screens. Copy the query selectors for both.


![image](media://56130aea-128c-4e62-8e35-5552340b98b9)

|  |
| --- |
| ```
In the view screen, the query selector copied from the "textField" custom field is: #rowForcustomfield_10301
``` |

  


Do the same fore the Edit view:

![image](media://1d635352-9d1d-48f6-b69c-e00f326215d2)


|  |
| --- |
| ```
In the edit screen, the query selector copied from the "textField" custom field is: #qf-field-customfield_10301
``` |

##   
Hiding and Disabling Custom Fields Based on Selection

**Main Script**

|  |
| --- |
| ```
lfInstantHook("issueType", "LiveFields/hook.sil");
lfWatch("issueType", "issueType", "LiveFields/hook.sil");
``` |

**Hook Script**

|  |
| --- |
| ```
if (argv["issueType"] == "Task") {
    lfExecuteJS("LiveFields/hide.js");
} else if (argv["issueType"] == "Bug") {
    lfExecuteJS("LiveFields/show.js");
}
``` |

  
**show.js**

|  |
| --- |
| ```
AJS.$("#rowForcustomfield_10301").show();
AJS.$("#qf-field-customfield_10301").show();
``` |

  
**hide.js**

|  |
| --- |
| ```
AJS.$("#rowForcustomfield_10301").hide();
AJS.$("#qf-field-customfield_10301").hide();
``` |


![image](media://1fce1581-1810-4315-a876-fe680152de9f)

##  Additional Help

Need help implementing this script? Talk to me directly to me by clicking on the bot on this page.

## Related articles



> Macro (contentbylabel)

> Macro (details)
> 
> | Related issues |  |
> | --- | --- |