2

I want to add some javascript via BugMonkey or a plugin that disables or hides a drop-down field. How do I do that?

flag

1 Answer

2

First, find the ID of the <input> element for the text field by inspecting the edit page's DOM.

For example, the Estimate (current) field:

<input type="text" maxlength="40" name="hrsCurrEstNew"
       id="hrsCurrEstNew" class="bugEditing dlgText"
       tabindex="611" value="" title="">

The ID is hrsCurrEstNew. To disable this field, run this javascript:

$('#hrsCurrEstNew').attr('readonly','true');

To remove it:

$('#hrsCurrEstNew').hide();

You might want to use jQuery to find a containing element and hide it. Google is your friend here ;)

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.