On 2007-04-10 07:50:50 -0600, "Todd O'Bryan" <[EMAIL PROTECTED]> said:
> > We've discovered in a couple of places that we need the ability for > people to choose something from a list or to create a new item. In the > admin, creating a new item involves having a pop-up open, but we'd like > to avoid that, if possible. > > We've kind of decided on a "Create new..." item in the list that would > cause a text field to appear via JavaScript magic. Moving away from > "Create new..." to one of the other choices would cause the text field > to disappear. > > First question: Does this seem reasonable/intuitive/clean? > > Second question: Right now, we think the easiest way to implement this > is by creating a new Field class that combines the drop-down field and > text field and includes the JavaScript necessary to combine them > together. Is that the right approach or should we be looking for > something less complicated? > > Thanks, > Todd > > > > I like your thinking on this as I see it as very intutive. I don't have any code samples to provide, but I have a quick question about the UI of it. How would something this this handle a foreign key model that had more than one required field to save itself? Just wondering if you came across something like that. To me it would seem that creating a custom widget that had the dropdown plus a hidden text field on load would be the best way to approach this. -- Brian Rosner http://www.brosner.com/blog --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---