Plugin Developer DiscussionDiscussion for FogBugz Plugin developers |
||
I have two CBugDisplayDialogItems. The first has a drop down box. For some values of this drop down, I want the CBugDisplayDialogItem to be visible. How might I go about doing this?
Yes, I figured out this part. The problem is that I don't know what JS to use to toggle the visibility of the second field. I am familiar with this process in FB6, but this aspect of the Bug rendering process has changed at lot sense then.
I know this isn't related to your question, Stefan, but in case anybody else reads this topic, there is a way to set the onchange via Forms.SelectInput. One of the overloads includes an "IDictionary dictAttrSelect" parameter, so you can do the following:
Hashtable dictAttr = new Hashtable(); dictAttr("onchange") = "return dosomething();" Forms.SelectInput(..., dictAttr);
For your question, Stefan, I'm not sure I understand how this is supposed to work. Is this somewhat correct?
1. Your plugin returns two CBugDisplayDialogItems 2. The second field should only show up if the first one has a certain value in the dropdown 3. The second field shouldn't show up under "Add Fields", because it's toggled by the first field If that's the case, that's not really something we support right now. We assume that a Field is always available, so we don't have any code path that will add/remove fields on the fly. I can open a feature request, but it probably won't make it in before release. The only workaround I can think of is to put two input boxes in one CDialogItem and show/hide the second one, but I'm sure you've thought of that and it doesn't work in your case.
Thanks David,
>The only workaround I can think of is to put two input boxes in one CDialogItem and show/hide the second one, but I'm sure you've thought of that and it doesn't work in your case. This is not what I hoped for, but in this case, it'll work alright. PS I think I might have an alpha of the kanban board plugin today if you would like to take a look. |
Powered by FogBugz