1

1

I am writing a plugin and 'discovered' that by passing the following options

{"pgsrc", "pgEmailSuggestions"},
{"delimiters", ";,"},
{"ffillparentwidth", "1"},
{"fignoreinputtracking", "1"},
{"nshorttokenlength", "50"},
{"fwriteback", "1"},
{"fescapeinitialquotes", "1"},
{"fxnvalidate", "IsValidEmailStrict"},
{"fchunky", "1"}

to a FogCreek.FogBugz.UI.Forms.TextInput constructor, I obtained a very nice person search bar that automatically returned results via AJAX.

However, I could not find any documentation on what are the options that can be passed to a TextInput or other form inputs.

Are there more gems hidden behind the options constructor argument? How could I find more documentation about that?

flag

2 Answers

4

What you've uncovered is what is internally known as a "droplist" input field. Droplist-powered fields actually cover quite a wide range of UI conventions within FogBugz. Some examples include the "chunky" tags field, email auto-suggest fields, case id auto-suggest fields, smart dropdowns such as the "Assign To" field that do filtering as you type, among other things.

That all being said, this functionality was never really intended for plugins to leverage, although we also don't do anything to stop you from doing so.

What you're seeing with the optional options parameter (which is actually called dictAttr in the source code), is not actually anything special or secret. That parameter is simply used to map arbitrary attribute names to attribute values in the underlying HTML tag that is being generated. This dictionary can be used to add a style or onclick attribute, for example.

But, as you've discovered, by specifying certain "magic" attributes, our droplist code will automatically add additional functionality to your input box. :)

link|flag
2

It's all kind of adhoc and added as we need things for FogBugz features. Another pgsrc that may be useful is pgBugTitleSuggestions. That's used to suggest cases for the Subcases and Duplicates fields.

link|flag
And when using pgEmailSuggestions, is it possible to have it also return the ixPerson along with the full name and email by any chance? – Rodrigue Feb 11 2011 at 16:01
Sorry, no. Many of those emails are from the Correspondent field, which don't even have ixPerson entries. If you want active people, you may also try looking at the global DB.Person array. – Ted Feb 11 2011 at 21:06

Your Answer

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