I have originally posted the following to

Max Kanat-Alexander pointed me back to here.

Following my message I have found that "product" URL parameter only
exists on New bug page and following is of no use on any other page.
So again I am in the dark

Original message:

Hi everyone!

I am trying to apply


to bugzilla 3.2-rc2. I have applied it and trying to get it to work.
In "Show Condition" I have tried

if(document.getElementsByName('product').value== 'my_product'){
return false;


which doesn't work, because at the time the script runs "product"
element is not available, then I have found "getURLParam" function
from google

function getURLParam(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ )
if (
() + "=") > -1 ){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
return unescape(strReturn);

and used following;

if(getURLParam('product') == 'my_product'){
return false;


which woks. I don't know how am I supposed to code in "Advanced
Custom fields" fields, Is above OK?

Is it possible to get an example for each.